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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
fantom71
Frequent Visitor

Conditionally hiding Gauge Chart based off of another measure.

Hello all,

 

TLDR: I'm looking for an ability to hide a visual similar to the IsVisable function in Power Apps.

 

I'm still new to the Power platform but have a come a long way since i began a few months ago.  My current project is to collect results from audits and display a (busy) kpi to quickly detect where our higher risk areas are.  The audit questions have answers of; yes, no, N/A.  Conditional formatting took are of the guage fill color to align with our requirements.  When the result is 0%, the fill for the entire card is marked as red to immediately see the worst issues.  The issue comes in with a question where all responses are N/A.  We do not want to see a red card for something that is not applicable.  My current state is this with test data:

 

kpi.png

 

I have searched everywhere for a solution to hide a visual based off of a calculated value ie HideRad =  ([countRows] - [filteredCountRadNA]) similar to the IsVisable function in Power Apps where i would just write If({HideRad] != 0, true, false) and i would done but a search on here and YouTube has not revealed anything close.  I have seen options for changing backgrounds conditionally or adding another chart based off of a button or slicer but nothing like what i am fighting.

My desired outcome would either just hide the entire visual or create an overlay showing that the topic is N/A.

 

Thanks in advance for your suggestions.

1 ACCEPTED SOLUTION
v-yajiewan-msft
Community Support
Community Support

Hi @fantom71,  

There is no direct “visible” attribute in the Power BI visualizations.

 

As a workaround, we can create a card visual to override the gauge visual, displaying the text when it's all NA, and changing the card's background color to transparent when it has a value.

 

This can be a big job, as you need to create a corresponding card visual for each gauge visual.

 

In your case, create the measure or calcualted column as shown below:

 

HideVisual = IF([countRows] - [filteredCountRadNA])=0,"N/Y","")
 
Then drag HideVisual onto the “Fields” of the card, making sure the card filter is the same as the gauge visual fitler:
vyajiewanmsft_0-1724735524297.png

Then create another measure that indirectly hides the card view by setting the background color of the card visual to transparent:

 

Make Transparent =
      IF(
         [HideVisual]="",
         "#FFFFFF00", 
         "White"
      )

vyajiewanmsft_1-1724734477471.png
vyajiewanmsft_1-1724735639346.png

 


 

Sample test result for your reference:

 

vyajiewanmsft_3-1724734730432.png

 

vyajiewanmsft_5-1724735344057.png

 

View solution in original post

2 REPLIES 2
v-yajiewan-msft
Community Support
Community Support

Hi @fantom71,  

There is no direct “visible” attribute in the Power BI visualizations.

 

As a workaround, we can create a card visual to override the gauge visual, displaying the text when it's all NA, and changing the card's background color to transparent when it has a value.

 

This can be a big job, as you need to create a corresponding card visual for each gauge visual.

 

In your case, create the measure or calcualted column as shown below:

 

HideVisual = IF([countRows] - [filteredCountRadNA])=0,"N/Y","")
 
Then drag HideVisual onto the “Fields” of the card, making sure the card filter is the same as the gauge visual fitler:
vyajiewanmsft_0-1724735524297.png

Then create another measure that indirectly hides the card view by setting the background color of the card visual to transparent:

 

Make Transparent =
      IF(
         [HideVisual]="",
         "#FFFFFF00", 
         "White"
      )

vyajiewanmsft_1-1724734477471.png
vyajiewanmsft_1-1724735639346.png

 


 

Sample test result for your reference:

 

vyajiewanmsft_3-1724734730432.png

 

vyajiewanmsft_5-1724735344057.png

 

V,
  Thank you for helping with this.  This works as described and accomplishes my peferred outcome.  There is a lot of work to accomplish but it will be worth it.  
 
Thank you again for your help.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.