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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
greeeniiish
Regular Visitor

DAX SUM per Category based on another table

Hi everyone,

 

I have two tables Summary and Sales. Summary has three columns "Entity", "Client", "Location". Sales has three columns "Entity", "Client", and "Amount". Both tables are connected using two Dim tables through the "Entity" column and another one based on the "Client" column.

 

The Sales table has more clients than Summary e.g. Client A can exists in Sales but not Summary. I would like to get the total Sum of each "Entity" from the Sales table and use it in the Summary table (regardless of the filter context).

 

Just to clarify, the name of the Entities on both sides are the same but Sales can have more clients that Summary, so a simple relation between the two would results in loss of some of the client "Amount"s.

 

Would you please guide me on a DAX measure or calculated column (I'd rather not do anything on the Power Query side).

 

Thanks

1 REPLY 1
amitchandak
Super User
Super User

@greeeniiish , A new column in summary

 

sumx( filter(sales, sales[entity] = summary[entity] ), sales[Amount])

 

refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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