Forum Discussion
Show/hide visuals with Slicer
Hello Team,
I am working on a project and the slicer has the group names.
ex - India, Australia, New zealand
i have separate donut visuals for the three groups on the overview page.
Now if end user selects India from the slicer it should only show India visual and other two visuals should hide.
also if the visual header has drill down or action button to navigate to sub group is it still possible to show/hide visual using the slicer
- Anonymous1 year ago
Hi Powerbi_me
Thank you very much MFelix and 123abc for your prompt reply.
For your question, here is the method I provided:
Here's some dummy data
“Table”
Create a new table to use as a slicer.
Slicer Table = SELECTCOLUMNS('Table', "Group", 'Table'[Group])Create a measure to determine the "Group" value selected by the slicer.
Group Select = IF( ISFILTERED('Slicer Table'[Group]) && SELECTEDVALUE('Slicer Table'[Group]) = SELECTEDVALUE('Table'[Group]), 1, 0 )Apply the following filter criteria to each donut visual:
You can get:
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- MFelix
Super User
Hi Powerbi_me ,
You cannot show/hide visuals with a Slicer you need to use bookmarks and bookmarks navigator. Bookmarks can be related with a specific data so you can force that when that bookmark is in place it filter out to India:https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-bookmarks
- 123abc
Community Champion
You can achieve this in Power BI by using bookmarks and selection panes. Here’s a step-by-step guide:
Create Bookmarks:
- Go to the “View” tab and enable the “Bookmarks Pane” and “Selection Pane”.
- Create a bookmark for each group (India, Australia, New Zealand) by setting the visibility of the respective donut visual and hiding the others.
- Name each bookmark accordingly (e.g., “India View”, “Australia View”, “New Zealand View”).
Set Up the Slicer:
- Add a slicer to your report with the group names (India, Australia, New Zealand).
Link Bookmarks to Slicer:
- Use the “Selection Pane” to control the visibility of each visual.
- Create a measure that captures the selected value from the slicer.
- Use this measure in a DAX formula to dynamically update the visuals based on the slicer selection.
Add Buttons for Navigation:
- If you have drill-downs or action buttons, you can add buttons to your report and link them to the bookmarks.
- Go to the “Insert” tab, add a button, and set its action to navigate to the corresponding bookmark.
Here’s a simple DAX example to get you started:
SelectedGroup = SELECTEDVALUE('YourTable'[GroupName])Then, use this measure to control the visibility of your visuals.
If you need more detailed steps or run into any issues, feel free to ask! 😊
- AnonymousNot applicable
Hi Powerbi_me
Thank you very much MFelix and 123abc for your prompt reply.
For your question, here is the method I provided:
Here's some dummy data
“Table”
Create a new table to use as a slicer.
Slicer Table = SELECTCOLUMNS('Table', "Group", 'Table'[Group])Create a measure to determine the "Group" value selected by the slicer.
Group Select = IF( ISFILTERED('Slicer Table'[Group]) && SELECTEDVALUE('Slicer Table'[Group]) = SELECTEDVALUE('Table'[Group]), 1, 0 )Apply the following filter criteria to each donut visual:
You can get:
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.