Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
605 views
in Technique[技术] by (71.8m points)

powerbi - Power BI Embed URL-multiple filters

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters for more information on how to use the SDK to apply filters.

You can also set filters during load.

https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details

You can see a working demo of using filters here:

https://microsoft.github.io/PowerBI-JavaScript/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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...