Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
I have two tables using them I want to get a new table. Please let me know how can I do this in Power BI. Thanks in adv
Solved! Go to Solution.
Hi @Herndon_powerbi ,
I have done it in two ways, please check:
NewTable using DAX =
var _t1=SUMMARIZE('Table1',"subject","english","total_marks",SUM(Table1[english]))
var _t2=SUMMARIZE('Table1',"subject","maths","total_marks",SUM(Table1[maths]))
var _t3=SUMMARIZE('Table2',"subject","science","total_marks",SUM('Table2'[science]))
return UNION(_t1,_t2,_t3)
For Table1: select english and maths column -->click "Unpivot columns"--> select Attribute column --> click "Groupby"
For Table2: select science column -->click "Unpivot columns"--> select Attribute column --> click "Groupby"
And then click "Append Queries as new " to create a new table like this:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much
Hi @Herndon_powerbi ,
I have done it in two ways, please check:
NewTable using DAX =
var _t1=SUMMARIZE('Table1',"subject","english","total_marks",SUM(Table1[english]))
var _t2=SUMMARIZE('Table1',"subject","maths","total_marks",SUM(Table1[maths]))
var _t3=SUMMARIZE('Table2',"subject","science","total_marks",SUM('Table2'[science]))
return UNION(_t1,_t2,_t3)
For Table1: select english and maths column -->click "Unpivot columns"--> select Attribute column --> click "Groupby"
For Table2: select science column -->click "Unpivot columns"--> select Attribute column --> click "Groupby"
And then click "Append Queries as new " to create a new table like this:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!