Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Solved! Go to Solution.
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.
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
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
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
Hi Xiaoxin Sheng,
>I'd like to suggest you contact power bi dev team for further support and comments if they are available in embedded API.
As the documentation and even the source code does not show, how to access this data, I would *love* to contact the DEV team. How can I achieve that?
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.
Hi Shakak,
yes, this is, what we wanted to achieve. We will try that.
Thank you!
Regards,
DibaSFP
Hi Shakak,
this worked, thank you!
Example:
// https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details#settings
State.report = powerbi.embed($reportContainer.get(0), {
type: 'report',
tokenType: models.TokenType.Embed,
accessToken: accessToken,
embedUrl: embedUrl,
id: embedReportId,
permissions: models.Permissions.View,
settings: {
background: reportTransparentBackground
? models.BackgroundType.Transparent
: models.BackgroundType.Default,
filterPaneEnabled: undefined, /* Setting is using the report default */
panes:{
bookmarks: {
visible: false
},
fields: {
expanded: false
},
/* Filters block disabled, as expanded/visible: undefined or similar is yet not supported here (see above) */
/* filters: {
expanded: false,
visible: false
}, */
pageNavigation: {
visible: false
},
selection: {
visible: true
},
syncSlicers: {
visible: true
},
visualizations: {
expanded: false
}
}
}
});
Kind regards,
DibaSFP
Hi @dibaSFP,
Maybe you can open a ticket to contact to dev team for further support about power bi embed: (it is free for pro and above licenses)
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
13 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
19 | |
3 | |
2 | |
2 | |
2 |