Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
We have a dashboard with more than 200 pages, actually these pages are just duplicates but depending on the topic of the chart certain slicers are added/deleted. Ideally, to improve performance and maintainability, we would only have 1 page. On this one page, depending on the selected topic, certain slicers would become visible and active. So far I have not found a way to do this with the current functionality in power bi. An option could be to develop such a slicer ourselves. Does anybody have any experiences with this or advice on how to do this?
Any help is much apreciated.
Thank you,
Martine
PS hiding visuals using the bookmarks is not an option, because it is not possible to dynamically navigate to the correct bookmark based on the user selection (in a different navigation slicer)
Hi @Martine10,
The visibility of a visual itself can only currently be controlled from the selection pane and bookmarks. Ideally, we need a generic property on the visual container that governs visibility based on a measure. This would then affect all visuals in Power BI without any work needed by third-party developers.
If you create a custom visual, you could probably have a property that uses conditional formatting. Still, the best you could do is hide the DOM components from the user rather than the visual itself. However, the visual container would still be present on the canvas and actively running queries for the normally displayed data despite not having any visible components. This isn't something you can easily control, as the visibility of a visual container governs whether it executes a query or not. If a visual is visible, then Power BI will push data to it. There are no custom visual APIs to prevent data loading.
If you can accept these limitations, it could be a possible approach to do what you're looking to do.
Regards,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Thank you very much Daniel. This helps a lot.
Do I understand correctly that it might be possible to develop a custom visual in which you can add conditional formatting such that it becomes invisible dynamically, but it is not possible to actually deactive the slicer. Such that it would still affect (filter) the data on the page?
Do you think a combination of creating a custom visual with conditional formatting
and using the option to hide the items in the slicers (see screenshot below). Would be feasible? Or would it then still be "active" in the background?
Thank you!
This is a good point. If you were to have a conditional property that determines whether the slicer content is visible, you should probably actively remove the applied filter in your visual logic. You would need to save this in your visual's persistence so that if/when the condition is displayed, it gets triggered, then the visual can re-apply the filter. The only problem with this is if you wish to sync slicers across pages - due to security restrictions, they can only share the active filter between slicer instances and no other persisted properties. I'm unsure if this will be an issue for you, but you will need to think about and test it quite heavily.
Regarding your second question, yes, the visual will always be on the canvas, as there's no way to explicitly hide it from Power BI outside of manually hiding it in the selection pane or using bookmarks.
Regards,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
11 | |
3 | |
2 | |
2 | |
2 |