
Announcements
Hello, Hope you're doing great.
I have been trying to hide filter pane on my power bi embedded report on Power Pages Portal.
I have hidden the filter pane from power Bi but it's still visible in Power Pages Site.
I have tried the following:
&filterPaneEnabled=FalseIt didn't work.
Also tried the following code:
$( document ).ready(function() {
var rpEle = $('.portal-pbi-embedded'); // select report element
var report = powerbi.get(rpEle[0]); // get report instance
// we want to update settings when the report is loaded
report.on("loaded", function () {
const newSettings = {
panes: {
filters :{
visible: false // hide filter pane
}
}
};
report.updateSettings(newSettings)
.catch(error => { console.log(error) });
});
});It also didn't work.
Kindly help me out here thanks.
Found the solution... I was pasting the code in Localized Contents...
To add custom JavaScript to a webpage:
Code:
$(document).ready(function () {
var embedContainer = $(".powerbi")[0];
if (embedContainer) {
var report = powerbi.get(embedContainer);
report.on("loaded", function () {
report.updateSettings({
panes: {
filters: {
visible: false
},
pageNavigation: {
visible: false
}
}
}).catch(function (errors) {
console.log(errors);
});
})
}
});