I have to meet a condition that when there is no selection in the slicer load only current year’s data otherwise filter data as per slicer selection. To achieve this, I have used “AllSelected” to find out if the count rows is same as the items in the slicer column. However, This condition becomes true at 2 cases
- When there is no selection in the slicer/
- When all items are selected (I want to avoid this)
In first case I am loading the current year’s data, in the latter i need to load all the data. Is there a way to achieve this? my DAX queries as below. Thanks.
Default Selection = COUNTROWS(DISTINCT(ALLSELECTED(‘Year’[KPIYEAR])))
All Selection = COUNTROWS(DISTINCT(ALL(‘Year’[KPIYEAR])))
Year Selection Count = IF([Default Selection] = [All Selection], 1 ,0)