Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
am00
New Member

Switch chart visibility based on filter selection

Hello everybody,

I have a dashboard with a main bar chart showing total amount drilled down by a specific dimension.

Then, on a separate part of the page, I have a detail section in which I would like to show a different detail chart based on whether the user has selected a single value in the main chart or not.

So, if the user selects a single value in the main chart, I would like to make DetailChart1 to be visible in the detail section.

Otherwise, if the user either does not select any value or selects mulitple values in the main chart, I would like to make DetailChart2 to be visible in the detail section.

 

I know visibility could be controlled using bookmarks, but as far as I know bookmark change must be triggered explicitly using buttons, whereas in my case I would like to switch the detail charts visibility based on the value selection in the main chart.

Is there a way to achieve this result?

 

Many thanks to everybody for the help,

Andrea

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @am00 

 

You can use a shape that sits on top of DetailChart1 and another one that sits on  top of DetailChart2. These visual objects are layered as follows Shape1 > DetailChart1 > Shape2 >DetailChart2 with the DetailChart2 on the very bottom. The shapes are conditionally formatted so the color fill blends with the background (could be white, depending on the canvas color) while the other is transparent and vice-versa based on whether a slicer returns a single value. Sample conditional formatting measure based on slicer selection:

Shape1 fill =
IF ( HASONEVALUE ( data[column] ), "white", "RGBA(0,0,0,0)" )

Shape2 fill =
IF ( HASONEVALUE ( data[column] ), "RGBA(0,0,0,0)", "white" )

 

Please note that the shapes don't become  invisible (like they can be  with bookmarks) but simply blend with the background which also means that since they're sitting on top of the detail charts, details charts cannot be used to crossfilter the other visuals as what gets clicked are the shapes.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
lkalawski
Super User
Super User

Hi @am00 ,

One of the solution is to use transparency to show/hide visual:
https://exceleratorbi.com.au/show-or-hide-a-power-bi-visual-based-on-selection/

 

You can also check the creation of SVG chart to show details and add switch in the measure to show the proper visual.

 

PBI_SuperUser_Rank@1x.pngResident Rockstar | Former Super User
If I helped, please accept the solution and give kudos! 
Connect with me
Linkedin

 

danextian
Super User
Super User

Hi @am00 

 

You can use a shape that sits on top of DetailChart1 and another one that sits on  top of DetailChart2. These visual objects are layered as follows Shape1 > DetailChart1 > Shape2 >DetailChart2 with the DetailChart2 on the very bottom. The shapes are conditionally formatted so the color fill blends with the background (could be white, depending on the canvas color) while the other is transparent and vice-versa based on whether a slicer returns a single value. Sample conditional formatting measure based on slicer selection:

Shape1 fill =
IF ( HASONEVALUE ( data[column] ), "white", "RGBA(0,0,0,0)" )

Shape2 fill =
IF ( HASONEVALUE ( data[column] ), "RGBA(0,0,0,0)", "white" )

 

Please note that the shapes don't become  invisible (like they can be  with bookmarks) but simply blend with the background which also means that since they're sitting on top of the detail charts, details charts cannot be used to crossfilter the other visuals as what gets clicked are the shapes.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors