Forum Discussion
How to hide an Info Button when visual has no data
- 1 year ago
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).
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.
- v-menakakota1 year ago
Community Support
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.