Skip to main content

Power BI

Under Review

Allow to pass parameters to an iframe for Power BI Embedded

Vote (96) Share
Paul's profile image

Paul on 20 Jul 2016 22:02:01

Scenario: We have a website with Power BI embedded analytics and details provided by SSRS reports. On the top you could see the parameters for the reports (multiple value, single value, all). It would be great if we could pass (securely) parameters to power bi embedded so that the datasource only shows certain data. Imagine that I would have to share this dataset for several customers and I want to filter data by customer instead of creating one datasource for each of them.
Thanks!

Comments (15)
Paul's profile image Profile Picture

26e27579 646e-473e-b56d-c16854c846bf on 05 Jul 2020 23:07:15

RE: Allow to pass parameters to an iframe for Power BI Embedded

So that means I cannot pass some date values from outside the report into the embedded report that filters it out??

Paul's profile image Profile Picture

99540b10 ad0e-4ddb-a167-e29d4147b048 on 05 Jul 2020 23:01:54

RE: Allow to pass parameters to an iframe for Power BI Embedded

https://powerbi.microsoft.com/en-us/blog/intro-pbi-js-api/
Hi i am using above to add filter . i have direct query.
but it not working.
my question does these filter support direct query embedded Power BI

Paul's profile image Profile Picture

d7a1a668 ae36-4606-8d35-19303bad5dab on 05 Jul 2020 22:57:19

RE: Allow to pass parameters to an iframe for Power BI Embedded

The FILTER solution may break the secutiry of my application, because i'm using the version "App owns data" and I'm using only one powerBi premium user for all of my clients.

If they change the URL from browser, they would see confidencial information of other client.

Paul's profile image Profile Picture

d7a1a668 ae36-4606-8d35-19303bad5dab on 05 Jul 2020 22:57:10

RE: Allow to pass parameters to an iframe for Power BI Embedded

There are something new about this great idea? I'm using the C# version (https://github.com/Microsoft/PowerBI-Developer-Samples/tree/master/App Owns Data).

Does anyone knows if there are some alternative to pass this parameter?

Paul's profile image Profile Picture

c070429c 94a7-40a7-82ca-23e25efcfec3 on 05 Jul 2020 22:52:56

RE: Allow to pass parameters to an iframe for Power BI Embedded

any update on this ?

Paul's profile image Profile Picture

54841a59 4044-46b8-bb58-b4243ebc1aa8 on 05 Jul 2020 22:49:00

RE: Allow to pass parameters to an iframe for Power BI Embedded

Do we have any update with Power BI Javascript for passing multiple filters

Paul's profile image Profile Picture

c127bf2a d0de-4415-901b-6f9e7b944023 on 05 Jul 2020 22:44:35

RE: Allow to pass parameters to an iframe for Power BI Embedded

It looks from the following documentation that you can add filters in javascript:
https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters

However, this is a security issue as javascript can be manipulated by a user. What is really needed is a way to pass filters from the server when generating the access token. This is somewhat possible now with the username, but that's only one value and we're currently forced to use it for something entirely different than username.

Paul's profile image Profile Picture

5e1e3c64 936b-427f-97c6-a0a67ff4f5ca on 05 Jul 2020 22:44:08

RE: Allow to pass parameters to an iframe for Power BI Embedded

Yes this is critical for filtering the report based on a particular user. It would be great if we were able to pass the extra params in JWT as arrays or comma separated strings too like the "roles" tag in JWT.

Eg: "customers": "A,B,C"

Paul's profile image Profile Picture

b2c1f9e2 66f8-4e93-a744-960e67c7b699 on 05 Jul 2020 22:41:47

RE: Allow to pass parameters to an iframe for Power BI Embedded

It is important to pass dynamic query parameters similar to how dynamic filters can be passed via report URL query string. This is because it would be better to filter the data at the datasource itself rather than loading everything and then apply filters on it.

Paul's profile image Profile Picture

400c5546 de77-4d44-a484-43a0597fa273 on 05 Jul 2020 22:40:50

RE: Allow to pass parameters to an iframe for Power BI Embedded

Would be perfect if passing parameters via PowerBI JavaScript API would possible