Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a filter on (let say) category:
cat1
cat2
cat3
cat4
In this filter the user can only select one or two values. In this case it does not make sense to select more and one of my visuals will become useless and confusing.
For my use case this makes perfectly sense.
So I have two questions:
1. Can I limit the values selected in my category filter?
2. A better solution, can I "see" when more that two category's are selected (so I can hide a visual)?
I tried to find a Dax function to count the selected fields in a filter so I can so a kind of "If numbOfFilter > 2 then....."
Solved! Go to Solution.
Can't you do a simple measure using a distinct count and then applying a filter
Visual filter =
VAR vFilterCount =
DISTINCTCOUNT(filterTable[filterColumn])
RETURN
IF(vFilterCount <= 2;1;0)
Then apply a visual filter on the measure that it has to be 1
Hi @sp_mike ,
I believe that your best option is to create a text box next to the slicer, and let the users know to is the max for a good presentation.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Proud to be a Super User!
I'll try to find another solution. I want to make it as monkey proof as possible.
But thanks for your suggestion.
Can't you do a simple measure using a distinct count and then applying a filter
Visual filter =
VAR vFilterCount =
DISTINCTCOUNT(filterTable[filterColumn])
RETURN
IF(vFilterCount <= 2;1;0)
Then apply a visual filter on the measure that it has to be 1