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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! 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

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

Power BI Monthly Update - September 2025

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

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.