Auto Insert Rows in PowerQuery to a Table
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Auto Insert Rows in PowerQuery to a Table

  1. #1
    New Member
    Join Date
    Aug 2017
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Auto Insert Rows in PowerQuery to a Table


    Auto Insert Rows in PowerQuery to a Table
    Any know how to auto insert a row in a table based off of set criteria? I have two tables I'm working with.

    1st Table is the main output table with part number, price, dates, po #, vendor name.
    2nd Table is a list of part numbers and licensing fees per unit per part number.

    Right now everything is done manually via IFs and VLookups in excel.

    In the current state, the row in red is manually inserted if the IF and Vlookup formula in the "Licensing Fee" column is "Yes".

    The main driver is Part Number. All other info in the RED row was copied from the row above it except for the Price/Unit.

    I want to be able to replicate and automate this manual process in Power Query. Example below.



    Example
    Date Vendor Part Number PO # Qty Price / Unit Total Licensing Fee
    1/10/99 Wylie ZYX-1 12344 100 100 $10,000 No
    1/11/99 ACME XYZ-1 12345 100 125 $12,500 Yes
    1/11/99 ACME XYZ-1 12345 25 $(2,500)

  2. #2
    MrExcel MVP
    Join Date
    Dec 2014
    Location
    Sydney, Australia
    Posts
    1,055
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Auto Insert Rows in PowerQuery to a Table

    What I would do is this

    1 set the original table to “do not load”
    2 create a reference to this table and filter for the event where a new record is required.
    3 make changes to the table in 2 so it has the records you want
    4 append table from 3 to 1
    Matt Allington is a professional Power BI consultant, Power BI Trainer and Microsoft MVP based in Sydney Australia at https://exceleratorbi.com.au.
    Author of the books Learn to Write DAX and Supercharge Power BI
    What is Power BI?

  3. #3
    New Member
    Join Date
    Aug 2017
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Auto Insert Rows in PowerQuery to a Table

    Thanks for your help Matt.

    That's exactly what I did and it solved the problem.

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

DMCA.com