Power BI嵌入网址 - 多个过滤器 [英] Power BI Embed URL-multiple filters
问题描述
& $ filter = {tableName / fieldName} eq'{fieldValue}'我一直在尝试使用过滤器查询语法过滤我的嵌入式PBI报告。
这个对我有用。
但是,当我应用多个过滤器时,PBI报告只能根据最后一个$过滤器进行过滤,而其他过滤器则不予考虑。
在Power BI嵌入URL中添加多个过滤器的方法?
2.0.0版本现在可以在报表范围和页面范围内获取和设置过滤器。我们目前不支持可视范围,但它计划在未来。
请参阅: https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters
了解如何使用SDK来申请过滤器。
您也可以在加载过程中设置过滤器。
$ b https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details
您可以在这里看到一个使用过滤器的工作演示:
https://microsoft.github.io/PowerBI-JavaScript/demo/filters.html
如果您申请的过滤器需要安全(它们不能被客户端修改),那么您必须在报告上使用RLS,然后添加用户向您的JWT令牌提供名称和/或角色声明。然后,使用此令牌查看报告的请求将仅显示允许的用户或角色的数据。
OData $ filter参数仅支持筛选功能的子集。如果您想要更复杂的值或条件,建议使用SDK构建过滤器对象。
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?
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.
这篇关于Power BI嵌入网址 - 多个过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!