Power BI Embed URL - 多个筛选器 [英] Power BI Embed URL-multiple filters

查看:25
本文介绍了Power BI Embed URL - 多个筛选器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用过滤器查询语法过滤我的嵌入式 PBI 报告:

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

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

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

这对我有用.但是,当我应用多个过滤器时,仅根据最后一个 $filter 过滤 PBI 报告,而忽略其他过滤器.

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.

有没有办法在 Power BI 嵌入 URL 中添加多个筛选器?

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

推荐答案

随着 2.0.0 的发布,您现在可以在报告范围和页面范围内获取和设置过滤器.我们目前不支持视觉范围,但计划在未来推出.

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.

参见:https://github.com/Microsoft/PowerBI-JavaScript/wiki/过滤器有关如何使用 SDK 应用过滤器的更多信息.

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/过滤器.html

如果您应用的过滤器需要安全(客户端无法修改它们),那么您必须在报告中使用 RLS,然后将用户名和/或角色声明添加到您的 JWT 令牌.然后,使用此令牌查看报告的请求将仅显示允许的用户或角色的数据.

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.

OData $filter 参数仅支持过滤器功能的子集.如果您想要更复杂的值或条件,建议使用 SDK 来构造过滤器对象.

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 Embed URL - 多个筛选器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆