Forum Discussion
Hide or Show table visual based on data available
- 10 months ago
I achieved this by using a slicer in the show and hide bookmarks, passing 0 and 1 values accordingly, and keeping the slicer hidden within the bookmarks.
Hi Renit,
Power BI doesn’t natively provide an option to completely hide visuals (like a table) based on slicer or filter selections. However, you can create a similar effect — making the table appear invisible when no data is available — by combining a simple DAX measure with visual-level filtering.
Here’s how you can achieve this:
Create a Measure:
Create a measure that counts the no of rows based on the current slicer selection:
Table Row Count =
COUNTROWS (
FILTER ( 'YourTable', --apply any filters if needed-- )
)
Now Apply a Visual-Level Filter
-
Add this measure to the Filters on this visual pane of your table view.
-
Set the filter condition to Show items when the value is greater than 0.
With this setup, the table visual won’t display any data when there are no matching rows for the selection. However, the visual space will still be retained on the report page — it will just appear blank to the user.
🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🔗 Curious to explore more? [Discover here]
But column headers of table will appear eventhough no data is available. How to handle this
- v-aatheeque10 months agoCommunity Support
Hi Renit
Power BI does not currently support completely hiding visuals or their headers dynamically based on slicer or filter selections. Even when no data is returned, the column headers of a table will still be displayed.- v-aatheeque10 months agoCommunity Support
Hi Renit
Just checking in to see if the previous response helped resolve your issue. If not, feel free to share your questions and we’ll be glad to assist.