如何使用过滤器嵌入 public 报告?

How to embed a public report using filters?

我想在我的网站中嵌入一个报告,使用过滤器并且我希望这个报告是 public

我看到你可以使用 "Publish to web" 选项来做到这一点,但你不能使用过滤器(我读过,但我不确定)

使用新的 "Embed" 选项,您可以过滤,但您需要有一个帐户才能查看报告。

有没有办法既进行过滤又允许互联网上的任何人访问?

谢谢

当您使用 "Publish to web" 时,过滤窗格将不可见,但您始终可以将切片器添加到您的报告中,这将允许您的访问者过滤数据。

正确的做法是actually embed the report into your site. You can see it in action in Power BI Embedded Playground。嵌入时,有两种情况 - "user owns data",其中每个访问者都需要 Power BI Pro 帐户才能查看报告,以及 "app owns data",其中您的应用程序使用一个 Power BI Pro 帐户来验证自己,但是您的用户根本不需要拥有 Power BI 帐户。在你的情况下,你需要后者。

只需下载微软的 sample application and configure it. You need to register Azure AD application to be used in your app. Then your app will authenticate itself and use Power BI REST API to get report's embedUrl and use it with Power BI JavaScript client 即可将其嵌入网页中的空白 <div>