The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I am new to POWER BI and for creating a dashboard I need to join these 2 tables based on index .
How do I write a DAX query to join the index of 2nd table to the column name of 1st in POWER BI. Is there any other way to do so?
How do I write a DAX query to join the index of 2nd table to the column name of 1st in POWER BI. Is there any other way to do so?
Solved! Go to Solution.
Hi @namitajuneja15 ,
I'd do this in Power Query rather than DAX:
You'll want to import both tables into PQ using 'Get Data'. We'll call the top one TableA and the bottom one TableB.
Once you have TableA open in PQ, select the [ID] column and go to the Transform tab > Unpivot Columns (dropdown) > Unpivot Other Columns.
Now you can go to the Home tab > Merge Queries and merge on TableA[Attribute] = TableB[Index].
Pete
Proud to be a Datanaut!
Thanks a lot guys, Your procedures really helped me tackle the situation
Hi @namitajuneja15 ,
I'd do this in Power Query rather than DAX:
You'll want to import both tables into PQ using 'Get Data'. We'll call the top one TableA and the bottom one TableB.
Once you have TableA open in PQ, select the [ID] column and go to the Transform tab > Unpivot Columns (dropdown) > Unpivot Other Columns.
Now you can go to the Home tab > Merge Queries and merge on TableA[Attribute] = TableB[Index].
Pete
Proud to be a Datanaut!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.