Forum Discussion

M_Dmitry's avatar
M_Dmitry
New Member
6 years ago
Solved

Merging two data tables by creating the columns from second table dates.

Hello Dear professionals!   I have a data in Power Query from Sql.    UniqueID  Name   Amount  Type  (then I have a Table "br_Data") 1               Y.K.         10           L                  ...
  • FarhanAhmed's avatar
    6 years ago

    Try

     

    1- Duplicate your table.

    2- In new table remove all rows other that "Table"

    3- Add new column ("Year-Period") that will Concatenate "Year" & Period

    4- Remove all columns except "Unique ID" "Year-Period" "Persons"

    5- Pivot this table accordingly

    Above will create your 2nd table having unique values against each ID

     

    6- Now From orignal table delete "Table" column

    7- Merge this table with above table based on "UniqueId" and hopefully you will have your results