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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
gchi
Regular Visitor

Show and Hide Shapes or Buttons based on conditions

Hi, I'm pretty new with Power BI, especially by adding visuals with dynamic factors based on values from a table - so pardon my question - but I've been trying to Google this and haven't found a direct answer to what I am looking for.

I'm interested in making either a shape-object or button-object to show/hide itself based on values from a column.

 

I am working on an example table which contains a column called "Binarycolumn" - in which it has multiple rows with two different integer values. They are represented by either '0' or '1'.

 

Example: 

 

| Binarycolumn |

| 0                     |

| 1                     |

| 1                     |

| 0                     |

| 0                     |

 

In the scenario where all of these rows in the table are of value '0', I want the button/shape to hide.

In the scenario where any of these rows in the table are of value '1'. I want the button/shape to show.

 

Is this possible?

And how do I go forward with this and start working with DAX for this purpose?... I can't seem to find a way to target the buttons/shapes placed on the dashboards to do anything dynamically...

 

I don't know where to start, please let me know if this is possible in any way - I've been scratching my head for days for this... 🙂

 

 

What am I trying to achieve?

I'm trying to create a dashboard that queries a database which indicates about incidents represented by these 'int' values every 15 minutes. These shapes-/button-objects are supposed to overlap eachother and is a part of the incident indicators for each individual customer that we have in our database.

 

2022-09-13_11-16-36.png

3 REPLIES 3
Anonymous
Not applicable

Hi @gchi ,

You can refer the following links to get it:

1. Using bookmarks and button

How To Show & Hide Visuals Using Power BI Bookmarks & A Button

yingyinr_0-1663143492569.png

2. Creating a mask card

Show or Hide a Power BI Visual Based on Selection

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Hi, @Anonymous !

Thank you for your information, but those articles are based upon click actions that you take. Which I'm unable to relate what I need to adjust for the dashboard buttons/shapes dynamically changing based on table data.

I have now created a more realistic example attached as a pbix-file on Google Drive downloadable here (can't see any options to attach this in the reply)...
I am specifically looking for buttons/shape conditions that will change their color from green to red whenever it is discovered a 'failure' value from the 'State'-column, related to the customers as seen on the example table.

I am wondering about how to do this.
I've also tried to have a look with the PowerFx possibility for the shape filling options, but I have not managed to understand the capabilities quite well for this scenario and unable to create conditions based on my needs... Plus, it might not be the right option for the solution based on my short understanding of it.


(The PowerFx fill conditioning I'm talking about as referred below:)

Apply conditional table formatting in Power BI - Power BI | Microsoft Docs

 

Br, gchi

Anonymous
Not applicable

Hi @gchi,

Did you found any solution for it?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors