Forum Discussion
getting value of Page Level Filters with Dax code
- 9 years ago
Hi myti
You can retrieve the value of a slicer / page level filter / report level filter with the following measure:
Measure = If ( HasOneValue(Table[SlicerCol]) , Values (Table[SlicerCol]) )
You can then pass this value in a variable for a filter condition or apply if statements / Switch
But it only works if the user selected a single value, otherwise it returns blank.
In your particular example, you can try to pass the whole Channel table as a filter argument.
Store Sales = Calculate ( [Total Sales] , Channel )
Channel table will be evaluated in the current filter context and thus takes into account the filter(s) applied by the user.
Hi myti
You can retrieve the value of a slicer / page level filter / report level filter with the following measure:
Measure = If ( HasOneValue(Table[SlicerCol]) , Values (Table[SlicerCol]) )
You can then pass this value in a variable for a filter condition or apply if statements / Switch
But it only works if the user selected a single value, otherwise it returns blank.
In your particular example, you can try to pass the whole Channel table as a filter argument.
Store Sales = Calculate ( [Total Sales] , Channel )
Channel table will be evaluated in the current filter context and thus takes into account the filter(s) applied by the user.