In addition to @Kalgi's answer, there's another way to do this:
JavaScript (browser client side) controls the loaded BI report by postMessage() calls with parameters (just like in the question above). There is an extra option oDataFilter that can be set to filter the report.
Set it like this: oDataFilter: "Store/PostalCode eq '15012'"
Full code would look like this:
function onFrameLoaded() {
var m = {
action: "loadReport",
reportId: reportId,
accessToken: accessToken,
oDataFilter: "Store/PostalCode eq '15012'"
};
iframe.contentWindow.postMessage(JSON.stringify(m), "*");
}
Ready to elevate your data skills? Dive into our Power BI Course Details and embark on a transformative learning journey designed for data enthusiasts, analysts, and business intelligence professionals!
Also Read:
How to manage file size and multiple numeric what-if parameters?