Forum Discussion
Pbiuserr
4 years agoPost Prodigy
Slicer does not trigger card value
Hello, Looking for the picture down below P HC supposed to be 0, as I slice on "PermTmpCOD" = T. The measure is standard P HC = CALCULATE ( [HC], PermTmpCOD = "P"). I tried with ALLSELECTED but it ...
- 4 years ago
Hi there!
Try the following:
CALCULATE ( [HC], KEEPFILTERS( PermTmpCOD = "P" ) )
Let me know if that helps!
PabloDeheza
4 years agoSolution Sage
Hi there!
Try the following:
CALCULATE ( [HC], KEEPFILTERS( PermTmpCOD = "P" ) )
Let me know if that helps!
Pbiuserr
4 years agoPost Prodigy
It works! Can you elaborate a little what you've done?
- PabloDeheza4 years agoSolution Sage
Sure thing!
So, when you apply a "filter" with CALCULATE, you are essencially removing any existing filter applied to the same column, replacing it with the new filter that you defined. If you dont want to lose the existing filter, then KEEPFILTERS comes in handy as it will keep the filter that you applied outside of the measure, and also the filter applied on your CALCULATE function.
For a better understanding of this I suggest reading this posts: