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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
khaen
Frequent Visitor

Total Sales DAX Not Correct

I have a sample data report with just a single table of data and a slicer for Date and slicer for Custumer Name.  I am trying to show Total Sales (for all customers) for the time interval selected by the slicer.  When I change the Date slicer it changes the Total Sales number, like it should.  But when I pick a customer it also changes the Total Sales, which it should not.  I am using:

 

Total Sales = CALCULATE(sum(Data[Sales]),ALLEXCEPT(Data,Data[Invoice Date]))

 

I thought this should ignore all filters except the date?  I have a small sample file, since it seems to be data dependant.

https://curtjoa-my.sharepoint.com/:u:/g/personal/khaen_joa_com/ESsJpMiKBWdMg0Lp9jndEscB4v4ICbtFXr3W2...

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

I'm wondering if you had your customers in a dimension table and based your slicer on that if your measure would work. Just ran into a similar situation with ALL in another thread.

 

https://community.powerbi.com/t5/Desktop/Suspected-BUG-when-using-ALL-with-multiple-non-ignored-slic...

 


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

I'm wondering if you had your customers in a dimension table and based your slicer on that if your measure would work. Just ran into a similar situation with ALL in another thread.

 

https://community.powerbi.com/t5/Desktop/Suspected-BUG-when-using-ALL-with-multiple-non-ignored-slic...

 


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

It also is a pain for all charts.  I have one chart that show sales of each part number.  I click on a part number in there and the Total Sales is broke again, unless I create a table of part numbers and show that on the chart instead.  But it seems to work.

Hi @khaen

Does the solution solve your problem indeed?

If so, could you kindly mark the answer as a solution so others may refer to it.

 

Best Regards

maggie

It does work!  Seems like a strange fix, but I guess it is not the end of the world.  I also need to point all my charts to this new table, otherwise they still break the total.  But all seems to work.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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