Forum Discussion
cliang
3 years agoFrequent Visitor
Card doesn't change when slicing
Hello, I have a few cards that are using DAX formulas to filter values but when I slice the data using different slicers, sometimes it changes and sometimes it doesn't. I've tried two different m...
- 3 years ago
When you use Students_SM1[STUDENT_STATUS] = "Active student" in a calcualte that overrides any filter you apply to the Students_SM1[STUDENT_STATUS] column so that is why your slicer is not working. If you want to count only the actives and not show anything if you turn off actives you need to include a KEEPFILTERS like this:
Count Active = CALCULATE ( DISTINCTCOUNT ( Students_SM1[ID_KEY] ), KEEPFILTERS ( Students_SM1[STUDENT_STATUS] = "Active Student" ) )
jdbuchanan71
3 years agoSuper User
When you use Students_SM1[STUDENT_STATUS] = "Active student" in a calcualte that overrides any filter you apply to the Students_SM1[STUDENT_STATUS] column so that is why your slicer is not working. If you want to count only the actives and not show anything if you turn off actives you need to include a KEEPFILTERS like this:
Count Active =
CALCULATE (
DISTINCTCOUNT ( Students_SM1[ID_KEY] ),
KEEPFILTERS ( Students_SM1[STUDENT_STATUS] = "Active Student" )
)cliang
3 years agoFrequent Visitor
This worked! Thank you so much!