Forum Discussion
Creating a measure that ignores a specific filter context
Anonymous Use ALLEXCEPT instead of ALL, or use this instead: https://youtu.be/fH0VcV9Smow
- Anonymous4 years agoNot applicable
Greg_Deckler Thanks Greg, I'll check out those resources. Do you happen to know why my formula with the ALL function doesn't work?
- Greg_Deckler4 years ago
Community Champion
Anonymous Because ALL strips out all context, including the context that you want to keep. Hence, ALLEXCEPT, strip out all context except the ones that you want to keep. Or, you could use ALLSELECTED, that would keep all filters external to the visual and since Year is in the visual, that would go away. Or, or, you could potentially use REMOVEFILTERS to remove the Year filter.
- Anonymous4 years agoNot applicable
Greg_Deckler Thanks, this is kind of driving me nuts here. No matter what I try, I am still returning only the sales of the latest year, or 2022. For e.g. I tried:
Measure = CALCULATE ([Sales],ALLSELECTED('Date'[Year]))And I still end up with the same output as my screenshot above. Even though I know it should return the sum of [Sales] across all years in the matrix.Any idea what may be causing this behavior?