The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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!!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
97 | |
81 | |
62 | |
54 |
User | Count |
---|---|
246 | |
119 | |
114 | |
87 | |
70 |