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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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