Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello,
I am using power BI Reporting. I created a report and would like to hide the pages, based on the value in a measure. If the measure is 1 then hide the page named Service, if the measure is 2 hide the Summary and Service pages, etc. How is this done?
Cheers,
Peter
Hi,
I am pretty new here. Maybe you could research some of the button/bookmark options and create rules based on them. I am not sure how exactly to do that, but maybe that points you in the right direction.
Best of luck,
Cam
This is not a feature of Power BI. If you explain more about the context, there may be another way to achieve the effect you're looking for though (e.g. hiding visuals instead of pages). Bookmarks will let you hide multiple visuals at a time, so you could use field parameters and/or bookmarks for a dynamic element.
Thank you all for the quick replies!
Currently I have a report and am pssing in a filter. The report is embeded in a web page. Based on the passed in filter I want to hide certain pages in the report. My report pages each have names. So when a filter value of 'Sam' is passed in, I want to hide the values page. When a filter of 'Bob' is passed in I want to show the Values page and hide the CustomerCost page. The visuals on the pages show content that is specific to that page. If I try to hide the visuals, as suggested about, the page still appears to the user, but there is nothing on it. I hope that helps describe my project.
Sincerely,
Peter
To achieve the functionality you described, where you want to dynamically show or hide report pages in Power BI based on a passed-in filter, you can use Power BI's JavaScript API in combination with some custom code on your web page.
Here's a general outline of the steps you would need to follow:
Embed the Power BI Report:
Set Up a Filter:
JavaScript Code for Page Visibility:
Here's an example of what the JavaScript code might look like:
HTML Elements:
This code listens for changes in the filter selection, and based on the selected filter value, it specifies which report pages to show and hide using the updateSettings method of the Power BI JavaScript API. This way, you can dynamically control the visibility of report pages based on the selected filter value.
Make sure to adapt the code to match your specific HTML structure, IDs, and the report configuration you have.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
84 | |
84 | |
73 | |
49 |
User | Count |
---|---|
143 | |
132 | |
110 | |
64 | |
55 |