The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Power BI Service bookmarks work well and I can save filters and personalise visual and once bookmark is applied - both filters and personalised view is presented.
When embedding same single page report in Power Apps portal for our Customers (non-AD users), I'm using Bookmarks API in JavaScript to Save and Load bookmarks state. As a result I can see that only Filters are applied, not Personalised visual.
Can this be fixed to work properly and apply both filters and personalised visual state.
JavaScript code used to Save and Load bookmarksManager state:
var yourGlobalVariable;
let btn = document.createElement("button");
btn.innerHTML = "Save";
btn.onclick = async function () {
var embedContainer = $(".powerbi")[0];
var report = powerbi.get(embedContainer);
let capturedBookmark = await report.bookmarksManager.capture({
allPages: true,
personalizeVisuals: true
});
yourGlobalVariable = capturedBookmark;
console.log(JSON.stringify(capturedBookmark));
};
document.body.appendChild(btn);
let btn2 = document.createElement("button");
btn2.innerHTML = "Load";
btn2.onclick = async function () {
var embedContainer = $(".powerbi")[0];
var report = powerbi.get(embedContainer);
report.bookmarksManager.applyState(yourGlobalVariable.state);
};
document.body.appendChild(btn2);
$(document).ready(function () {
console.log("starting power bi Config");
var embedContainer = $(".powerbi")[0];
if (embedContainer) {
var report = powerbi.get(embedContainer);
report.on("loaded", function () {
report.updateSettings({
panes: {
filters: {
visible: true
},
pageNavigation: {
visible: false
}
}
}).catch(function (errors) {
console.log(errors);
});
})
}
console.log("finished power bi Config");
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.