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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

ALLEXCEPT works with fact table, but not with date table

Hello peoples!
 
I want to calculate the percentage of X within a category and within a date, excluding 'total'-rows.
 
The measure works:
Measure = DIVIDE(SUM(FactsTable[Value]),CALCULATE(SUM(FactsTable[Value]),ALLEXCEPT(FactsTable,FactsTable[Category1]),ALLEXCEPT(FactsTable,FactsTable[Date]),FactsTable[Category2]<>"TOTAL"))
 
But this measure does not work:
Measure = DIVIDE(SUM(FactsTable[Value]),CALCULATE(SUM(FactsTable[Value]),ALLEXCEPT(FactsTable,FactsTable[Category1]),ALLEXCEPT(DateTable,DateTable[Date]),FactsTable[Category2]<>"TOTAL"))
 
The only difference is, that in the one that does not work, I am using the DateTable. I use the DateTable in many calculations and visualisations, and it works perfectly. Except for here, for some reason?
 
Why wouldn't the second measure work, and how could I fix that?
 
Thank you in advance!
 
EDIT: Okay, the opposite solution (indicate all columns you do want to filter on, instead of the columns you do not want to filter on) seems to work:
 
Measure = DIVIDE(SUM(FactsTable[Value]),CALCULATE(SUM(FactsTable[Value]),ALLSELECTED(FactsTable[CategoryA],FactsTable[CategoryB],FactsTable[CategoryC],FactsTable[CategoryC],FactsTable[CategoryD],FactsTable[CategoryE]),FactsTable[Category2]<>"TOTAL"))
 
Although, this doesn't work entirely correctly; I think I am getting the correct values in a matrix and in a scatter chart, but not in a scorecard (used as tooltip). How could I fix that?
 
And why did the first measure not work?
 
EDIT2: And, as a side question; is it possible to add a diagonal line to a scatter chart?
I want to see which points are above or below the diagional, so a trend line is useless.
Inserting a line and rotating it by 135 degrees is also useless, as the line is not drawn from corner to corner, so it is impossible to align this properly with the scatter chart.
1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

As far as I know, the prerequisite for the same measure to display the same value in different visuals is that the row context data grouping and filtering provided by these visuals must be consistent, and if you are convenient, you can first confirm that your scorecard and matrix and scatter chart have the same row context grouping, if it is inconsistent, then the different measure output is the expected result.

 

For your second question, there is currently no such setup that will meet your needs, if you have an idea to improve the scatter plot visual, please go to the idea forum and post an idea. https://ideas.powerbi.com/ideas/

 

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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