Forum Discussion

Powerbi_me's avatar
Powerbi_me
New Member
1 year ago
Solved

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

  • Anonymous's avatar
    Anonymous
    1 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

  • 123abc's avatar
    123abc
    Icon for Community Champion rankCommunity Champion

    You can achieve this in Power BI by using bookmarks and selection panes. Here’s a step-by-step guide:

    1. 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”).
    2. Set Up the Slicer:

      • Add a slicer to your report with the group names (India, Australia, New Zealand).
    3. 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.
    4. 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! 😊

  • Anonymous's avatar
    Anonymous
    Not 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.