top of page

Hide Power BI Visual Based on Slicer Selection

Updated: Dec 22, 2022

Recently one of our clients came to us wanting to know if we could show or hide a visual in Power BI based on a slicer selection. Importantly, the requirement was based on a slicer selection and not a button – this means Power BI bookmarks were not an option.

There are a number of scenarios where you might want to do this. For example, a visual may be relevant only for recent reporting periods which means you might want to show a visual if the report users selects 2019 or later and hide the visual if the user selects 2018 or earlier.

Alternatively, a certain split in the data might only be relevant for a certain product or category. For example, Category A, B, C don’t have a subcategory but Category D does and therefore when the user slices on Category D you might want to show the subcategory visual.

Reporting Period Example

(2019 Reporting Year)

(2018 Reporting Year)

With a bit of Power BI trickery this can be achieved:

Create one of these measures depending on your use case:

ShowHide = IF(MAX([Year]) >= 2019,0,1)


ShowHide = IF(MAX([Category]) = “Category D”,0,1)

Create a Treemap visual and drag the ShowHide measure on to Values

Adjust the field colour on the Treemap visual to white

Set the background transparency of the Treemap visual to 100%

Turn off Visual Heads in the formatting pane of the Treemap

Position the Tree Map in front the visual you want to show or hide (as below)

Test and Enjoy!

(Reporting Period) - Red Box indicates blank Treemap visual

Hope this is useful! Any questions or comments please feel free to leave below, or alternatively you can contact us at


Unknown member
Dec 20, 2022

Hello! Do you have a step-by-step instruction? I'm using Power BI service

Ross Honour
Ross Honour
Dec 22, 2022
Replying to

Unfortunately you will need to follow these steps using Power BI Desktop, as users are unable to create measures in the Power BI Service. Once the changes have been made in Power BI Desktop, you can publish the report to the Power BI Service.

bottom of page