How can we improve Power BI?

Allow to pass parameters to an iframe for Power BI Embedded

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!

85 votes
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)

We’ll send you updates on this idea

Paul shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

15 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • Anmol commented  ·   ·  Flag as inappropriate

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

  • GilbertoCrespo commented  ·   ·  Flag as inappropriate

    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.

  • Anonymous commented  ·   ·  Flag as inappropriate

    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.

  • Anonymous commented  ·   ·  Flag as inappropriate

    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"

  • Anonymous commented  ·   ·  Flag as inappropriate

    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.

  • Anonymous commented  ·   ·  Flag as inappropriate

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

  • Kevin H commented  ·   ·  Flag as inappropriate

    I voted for this, and here is more specifically what I think is the needed enhancement to RLS for Power BI Embedded:

    In addition to passing an RLS "role", I would like to be able to pass (in the app token) any number of parameters, which can be used WITHIN the corresponding rule for that role.

    Regarding current RLS functionality, per this page...
    https://docs.microsoft.com/en-us/azure/power-bi-embedded/power-bi-embedded-rls

    This help doc seemed to imply, but did not explicitly say, that if I (a) set up an RLS rule that includes the USERNAME() function in the table filter DAX expression, and (b) use Power BI Embedded to access the model...

    ...Then the USERNAME() function in the table filter DAX expression will evaluate to the "username" that was passed as part of the app token. For example, 'Andrew Ma' from the example.

    I wondered: is that true?

    And is it also true that the ONLY thing you can actually do with the "username" from the app token is to have it returned by the USERNAME() function, in a table filter DAX expression, as part of an RLS rule?

    I did some testing and I believe the answer to both questions is "yes."

    I think that in effect, the "username" element of the app token can be used as a single arbitrary parameter, to be used within a table filter DAX expression, as part of an RLS rule.

    It doesn't have to act strictly as a username; I passed an integer, and in my table filter DAX expression, I used VALUE(USERNAME()), and it worked to filter on an integer ID in any table.

    Which is really convenient!

    But also, it seems like a limitation that there is only one; and it is misleading that it is called "username". Instead, I think I should be able to pass any number of such parameters; and, they should have a more generic naming convention instead of "username".

    Instead, in the app token, I should be able to pass many parameters like param1 = "foo"; param2 = "145"; param3 = "false"

    And then, instead of the USERNAME() function, there should be a more generic function to use in the RLS filter DAX expressions to return the values of the parameters. Like APPTOKENPARAM("param2"), which would return "145" ... while APPTOKENPARAM("param3") would return "false".

  • Rafael Rangel commented  ·   ·  Flag as inappropriate

    Its importan to pass parameter to a report. I hav a case where the user needs to select the money exchange and view the reports in diferent money. And this is the begining...

  • Anonymous commented  ·   ·  Flag as inappropriate

    Yes this requirement is very important, we should be able to pass the parameters, bcz we want to dynamically generate reports for user specific data.

Feedback and Knowledge Base

Ready to get started?

Try new features of Power BI today by signing up and learn more about our powerful suite of apps.