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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
harry6810
Frequent Visitor

Summarizing values from different tables

Hi, need some help. I have two tables - Internet Sales and Reseller Sales. The common field is the OrderDateKey. Both tables include PTI, SalesAmount, OrderQuantity and TotalProductCost. How to combine on the matrix table those values as TotalSalesAmount, TotalOrderQuantity etc.?

harry6810_0-1616070589705.png

Thank you for any help.

J,

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@harry6810 , If this a many to many join. then better you do union and summarize

https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/

 

example

summarize(union(selectcolumns('Table'1,"Month",'Table'1[Month],"Figure",'Table'1[Figure],"Figure2",0),
selectcolumns('Table'2,"Month",'Table'2[Month],"Figure",0,"Figure2",'Table'2[Figure])),
[Month],"Figure", sum([Figure1]),"Figure2", sum([Figure2]))

 

 

or append and aggregate in power query

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

https://radacad.com/power-bi-aggregation-step-1-create-the-aggregated-table

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@harry6810 , If this a many to many join. then better you do union and summarize

https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/

 

example

summarize(union(selectcolumns('Table'1,"Month",'Table'1[Month],"Figure",'Table'1[Figure],"Figure2",0),
selectcolumns('Table'2,"Month",'Table'2[Month],"Figure",0,"Figure2",'Table'2[Figure])),
[Month],"Figure", sum([Figure1]),"Figure2", sum([Figure2]))

 

 

or append and aggregate in power query

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

https://radacad.com/power-bi-aggregation-step-1-create-the-aggregated-table

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.