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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Bhavyasree24
Helper I
Helper I

How to hide an Info Button when visual has no data

 

Hi everyone,

I'm working on a Power BI report where we've added an Info button next to a visual to display a description when clicked. However, if the visual has no data (e.g., shows "No data returned"), we want to hide the Info button dynamically.

Is there a way to conditionally hide or disable the Info button based on whether the associated visual has data or not?

Any suggestions or workaround would be greatly appreciated!

Thanks in advance.

 

1 ACCEPTED SOLUTION

@Bhavyasree24 To conditionally hide or disable the Info button based on whether the associated visual has data or not, you can use a workaround since Power BI does not support conditional formatting for button transparency directly.

 

Create a measure that returns a value based on whether the visual has data or not. For example:

HasData = IF(COUNTROWS('YourTable') > 0, 1, 0)

 

Since conditional formatting for transparency is not supported on buttons, you can use a shape (like a rectangle) and place it over the button. Then, apply the transparency logic to the shape.

 

Select the shape.
Go to the "Format" pane.
Under "Shape", find the "Fill" option.
Use the measure HasData to set the transparency. If HasData is 1, set transparency to 0% (fully visible). If HasData is 0, set transparency to 100% (fully hidden).




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

7 REPLIES 7
v-menakakota
Community Support
Community Support

Hi @Bhavyasree24 ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

 

Hi @Bhavyasree24 ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

Thank you.

Bhavyasree24
Helper I
Helper I

@bhanu_gautam Thanks for the reply,I implemented the dynamic transparency logic by creating the measure, and it works as expected for shapes. However, it doesn’t seem to apply to buttons, as conditional formatting for transparency is not supported on buttons.

Hi @Bhavyasree24 ,

 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

Hi @v-menakakota Still my query is open.

@Bhavyasree24 To conditionally hide or disable the Info button based on whether the associated visual has data or not, you can use a workaround since Power BI does not support conditional formatting for button transparency directly.

 

Create a measure that returns a value based on whether the visual has data or not. For example:

HasData = IF(COUNTROWS('YourTable') > 0, 1, 0)

 

Since conditional formatting for transparency is not supported on buttons, you can use a shape (like a rectangle) and place it over the button. Then, apply the transparency logic to the shape.

 

Select the shape.
Go to the "Format" pane.
Under "Shape", find the "Fill" option.
Use the measure HasData to set the transparency. If HasData is 1, set transparency to 0% (fully visible). If HasData is 0, set transparency to 100% (fully hidden).




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






bhanu_gautam
Super User
Super User

@Bhavyasree24 Create a measure that returns a value based on whether the visual has data or not. For example, you can create a measure that counts the rows in your dataset.

HasData = IF(COUNTROWS('YourTable') > 0, 1, 0)

 

Select the button.
Go to the "Format" pane.
Under "Button Text", find the "Conditional Formatting" option for "Fill".
Use the measure HasData to set the transparency. If HasData is 1, set transparency to 0% (fully visible). If HasData is 0, set transparency to 100% (fully hidden).




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors