Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I have a requirement where I need to ignore the filter for one value in the slicer.
For example, the slicer contains values like A, B, C, when the user selects A then all values should be shown in the table visual. It should ignore filtering for A and should show all values A, B, and C in visual.
But when the user selects B or C then only either B or C should be shown in the visual.
Here expected result will be
Thanks in advance.
Solved! Go to Solution.
Hi @Yogisha
You need to create additional table with no relationships. It will be dictionary for slicer values. And then create a measure with SWITCH function to add an action for each of the selection.
Table:
New table:
Table 2 = SELECTCOLUMNS('Table', "Slicer", 'Table'[Column1])
Measure:
Selected Value =
VAR __SelectedValue = SELECTEDVALUE('Table 2'[Slicer])
RETURN
SWITCH(__SelectedValue,
"A", SUM('Table'[Column2]),
CALCULATE(SUM('Table'[Column2]), FILTER('Table', 'Table'[Column1] = __SelectedValue))
)
The result:
Please check the .pbix file.
Proud to be a Super User. If I helped, please accept the solution and give kudos! |
Hi @Yogisha
You need to create additional table with no relationships. It will be dictionary for slicer values. And then create a measure with SWITCH function to add an action for each of the selection.
Table:
New table:
Table 2 = SELECTCOLUMNS('Table', "Slicer", 'Table'[Column1])
Measure:
Selected Value =
VAR __SelectedValue = SELECTEDVALUE('Table 2'[Slicer])
RETURN
SWITCH(__SelectedValue,
"A", SUM('Table'[Column2]),
CALCULATE(SUM('Table'[Column2]), FILTER('Table', 'Table'[Column1] = __SelectedValue))
)
The result:
Please check the .pbix file.
Proud to be a Super User. If I helped, please accept the solution and give kudos! |
Thank you..It worked like a champ!!
User | Count |
---|---|
98 | |
90 | |
77 | |
71 | |
64 |
User | Count |
---|---|
114 | |
98 | |
96 | |
68 | |
67 |