Forum Discussion
PowerBI Embedded: How to identify, if FilterPanel is visible in PBIX (outspacePane visibility)
Hi everyone,
if a report is opened in Power BI Service, the the filter panel (on the right) will be shown by default, if it not has been hidden in the PBIX file. If the report is embedded, then the filter panel is not shown until you programmatically change the visibility (updateSettings with pane:filters:visible = true or false).
Problem is, that this feature also allows to show the filter panel, if it has been hidden in the PBIX file. To get the same functionality as in Power BI Service, I would like to know the config value of the report (if the filter pane is hidden or not).
By analysing the JSON data loaded by the embed method I identified, that the information may be hidden in the "config" object, parameter "outspacePane" & "visibility" = false/true. Is there a way, how I can access the config object of the report object using JS (something like report.config.outspacePane)?
Or is there any other way to achieve this?
Regards,
DibaSFP
Hey,
Would you like Power BI embedded to respect the filter pane visble/hidden property of the PBIX report?
That is, if the filters pane was hidden in the desktop application then it should also be hidden in embed and if they are visible they should be alsp be visible in embed?
Try to update the PowerBI client / Javascript SDK to the latest version (2.14.1) and use "filterPaneEnabled: undefined" (won't work with panes:{filters:{visible:undefined}}), it should do what I mentioned above.
Btw if you rely on hiding the filters pane for security try to use RLS instead.
8 Replies
- AnonymousNot applicable
Hi dibaSFP,
It sounds like you are researching to use javascript to operate with power bi web api.
If this is the case, you can take a look at the following links about power bi javascript sample if they meet your requirement.
Introducing the new Power BI JavaScript API
Regards,
Xiaoxin Sheng
- dibaSFPAdvocate I
Dear Xiaoxin Sheng,
you can be sure that we have read all documentation and analysed the MS source code. I was not able to identify, how to access the "config" data loaded by the Power BI report object (where the information is delivered/hidden).
If someone could provide a code example, how to access the information using JS - this would be marvellous!
Regards,
DibaSFP
- AnonymousNot applicable
Hi dibaSFP,
Here are the links of official documents that I can find about custom on embed configurations. You can take a look at them if they mentioned the options you wanted:
Embed Configuration Details Custom layouts
If these also not meets to your requirement, I'd like to suggest you contact power bi dev team for further support and comments if they are available in embedded API.Regards,
Xiaoxin Sheng