Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear Experts,
Is it possible to get value of Page Level Filters with Dax code to create data model?
For example in the attcahed image in the Dax formulah: Channel[ChnnelName]=get value from page level filter. Page level filter is a table with name of stores.
Thank you-Myti
Solved! Go to Solution.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |