Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply

need help to create table

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

 

Herndon_powerbi_0-1625945760758.png

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Herndon_powerbi ,

 

I have done it in two ways, please check:

 

  • Use DAX:
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)

new table using DAX.PNG

 

 

  • In Power Query:

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"

transform tables.PNG

And then click "Append Queries as new " to create a new table like this:

append tables as a new table.PNG

 

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.

View solution in original post

Thank you so much

View solution in original post

2 REPLIES 2

Thank you so much

Anonymous
Not applicable

Hi @Herndon_powerbi ,

 

I have done it in two ways, please check:

 

  • Use DAX:
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)

new table using DAX.PNG

 

 

  • In Power Query:

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"

transform tables.PNG

And then click "Append Queries as new " to create a new table like this:

append tables as a new table.PNG

 

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.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.