Forum Discussion
Data Integration Challenge: Integrating Data from Table1, Table2, Table3 into Table4 Page& Reshaping
- 2 years ago
SBC ,
Assuming
1. CoreCurveCD, FACTORNAME, and RISK are columns in three tables Table1, Table2 and Table3
2. (0-1), (02-05), (06-11), (12-24), and 24+ different measures in each table.
To combine all three, you can follow this dax pattern
union( addcolumns( selectcolumns (Table1, “RISKJOINT”, Table1[CoreCurveCD] ) , “(0-1)”, [(0-1)], “(02-05)”, [(02-05)], “(06-11)”, [(06-11)], “(12-24)”, [(12-24)], “24+”, [24+] ), addcolumns( selectcolumns (Table2, “RISKJOINT”, Table2[FACTORNAME] ) , “(0-1)”, [(0-1)], “(02-05)”, [(02-05)], “(06-11)”, [(06-11)], “(12-24)”, [(12-24)], “24+”, [24+] ), addcolumns( selectcolumns (Table3, “RISKJOINT”, Table3[RISK] ) , “(0-1)”, [(0-1)], “(02-05)”, [(02-05)], “(06-11)”, [(06-11)], “(12-24)”, [(12-24)], “24+”, [24+] ), )I believe the logic of 4 measures for each table are different, in that case please make changes in the above code.
PS: calculated tables could degrade your sematic model performance.
If the post helps please give a thumbs up
If it solves your issue, please accept it as the solution to help the other members find it more quickly.
Tharun
Seems like you can just use the append tables function, Table.Append(tbl1, tbl2, tbl3)
--Nate
Hi Anonymous ,
Thank you for your suggestion on using the append tables function. I appreciate your input and the simplicity of the approach you've described. I did try appending the tables in Power Query earlier, which worked well for consolidating the CoreCurveCD, FACTORNAME, and RISK columns into the new RISKJOINT column. However, I encountered a challenge when attempting to include the additional measure-based columns (0-1, 02-05, 06-11, 12-24, 24+). Each table uses a unique logic for bucketing these measures, and unfortunately, these are not directly pulled through the append function. I need to ensure that the data for these measure columns is displayed correctly in the combined table4 page, reflecting the distinct calculations from each original table. If you have any further advice on how to achieve this, I would be very grateful for your expertise.
Thanks,
SBC
- tharunkumarRTK2 years agoSuper User
SBC ,
Assuming
1. CoreCurveCD, FACTORNAME, and RISK are columns in three tables Table1, Table2 and Table3
2. (0-1), (02-05), (06-11), (12-24), and 24+ different measures in each table.
To combine all three, you can follow this dax pattern
union( addcolumns( selectcolumns (Table1, “RISKJOINT”, Table1[CoreCurveCD] ) , “(0-1)”, [(0-1)], “(02-05)”, [(02-05)], “(06-11)”, [(06-11)], “(12-24)”, [(12-24)], “24+”, [24+] ), addcolumns( selectcolumns (Table2, “RISKJOINT”, Table2[FACTORNAME] ) , “(0-1)”, [(0-1)], “(02-05)”, [(02-05)], “(06-11)”, [(06-11)], “(12-24)”, [(12-24)], “24+”, [24+] ), addcolumns( selectcolumns (Table3, “RISKJOINT”, Table3[RISK] ) , “(0-1)”, [(0-1)], “(02-05)”, [(02-05)], “(06-11)”, [(06-11)], “(12-24)”, [(12-24)], “24+”, [24+] ), )I believe the logic of 4 measures for each table are different, in that case please make changes in the above code.
PS: calculated tables could degrade your sematic model performance.
If the post helps please give a thumbs up
If it solves your issue, please accept it as the solution to help the other members find it more quickly.
Tharun