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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Comparing filtered vs unfiltered total

Hi,
I am trying to compare the total value/sum of a field (‘sales’) vs the value/sum from a specific customer (‘sales’ done by ‘client X’) and I am not sure how to get there. The additional issue that I have the ‘client’ values in a separate data source.
An extremely simplified example is the following (there is a significant number of values in each data source):

 

Source A 
Transaction ID, Client Name , Other fields… 
TR01, Customer A, … 
TR02, Customer B, … 
TR03, Customer A, … 
TR04, Customer C, … 

 

Source B

Transaction ID, Value, Other fields…

TR01, 100£, …

TR02, 100£, …

TR03, 50£, …

TR04, 100£, …

 

I am trying to get a chart where I have a column of the total sales on one side (350£ in the example above) and a column sales only with a specific customer (e.g. Customer A) on the other side (150£ in the example above).

 

Customer A sales are basically included both in the "Customer Sales A" column AND in the "Total Sales" column.
Please let me know if this is not clear.

 

Many thanks in advance for any help.

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Assuming you have a relationship on TransactionID between the tables (if it is 1:1 relationship, you could consider merging those tables in power query), you just need two measures:

 

Total = sum(SourceB[Value])

CustomerA Total = calculate([Total], SourceA[Client Name] = "Customer A")

 

Note: you should also consider making a Customers table in Power Query with the unique list of Customers and their metadata.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

You need to use ALL or ALLEXCEPT or REMOVEFILTERS to get your unfiltered total.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
mahoneypat
Microsoft Employee
Microsoft Employee

Assuming you have a relationship on TransactionID between the tables (if it is 1:1 relationship, you could consider merging those tables in power query), you just need two measures:

 

Total = sum(SourceB[Value])

CustomerA Total = calculate([Total], SourceA[Client Name] = "Customer A")

 

Note: you should also consider making a Customers table in Power Query with the unique list of Customers and their metadata.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Many thanks @mahoneypat . This is exactly what I needed.

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors