Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Filter may have maxiumum two values selected

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 visua...
  • adambhappy's avatar
    adambhappy
    6 years ago

    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