5

I have been trying to filter my embedded PBI report using the filter query syntax:

&$filter={tableName/fieldName} eq '{fieldValue}'

and this works for me. However, when I apply more than one filter, the PBI report is filtered only according to the last $filter and other filters are disregarded.

Is there a way to add multiple filters in the Power BI embed URL?

6
  • 2
    This is a know limitation. Currently report embeds are limited to a single filter expression. Support for multiple filters and other client side commands are coming soon. Commented Jun 22, 2016 at 19:47
  • @WallaceBreza Thanks Commented Jun 27, 2016 at 12:33
  • @WallaceBreza Will multiple filtering work if I use Power BI REST APIs to make a call to my Power BI service? Commented Jul 1, 2016 at 12:39
  • Can you elaborate? The reports API in the REST service doesn't accept filters either at this point. Commented Jul 1, 2016 at 16:24
  • @WallaceBreza I have this web app in which I am trying to display a report from my Power BI service. For that, I am using the URL which I received from the reports API. Is it possible to add multiple filters to this URL? Commented Jul 3, 2016 at 8:20

1 Answer 1

7

With the release of 2.0.0 you can now get and set filters at report scope and page scope. We currently don't support visual scope but it is planned to come in the future.

See: https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/control-report-filters for more information on how to use the SDK to apply filters.

You can also set filters during load.

https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings

You can see a working demo of using filters here:

https://github.com/microsoft/PowerBI-JavaScript/blob/master/demo/filters.html

If the filters you are applying need to be secure (they can't be modified by the client) then you must use RLS on the report, and then add the username and/or role claims to your JWT token. Then requests to view the report with this token will only show data for allowed user or role.

The OData $filter parameter only supports a subset of filter capabilities. If you want to have more complex values or conditions it is recommended to use the SDK to construct filter objects.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.