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), "*");
}
If you are interested in learning Power BI, check out Power BI Curriculum now!