【发布时间】:2019-02-07 15:21:15
【问题描述】:
let
Source = Sql.Database(MyServer, MyDatabase, [Query="EXEC [dbo].[spEmployeesRead] '" & ActionCode & "', '" & UserID & "', NULL, NULL, NULL, NULL, '" & Alphabet & "'"])
in
Source
上面是我在查询编辑器中的存储过程,它运行良好并获取数据,因为我正在动态传递所有参数,包括服务器名称和数据库名称。我的问题是我已将报告保存并发布到 Power BI 服务,然后打开报告并从文件菜单获取嵌入代码并将参数传递给此报告 URL,以便我可以从其他应用程序访问它,并且该应用程序将动态传递参数值但似乎事情无法正常工作。谁能检查我哪里错了。
https://app.powerbi.com/reportEmbed?reportId=341f891b-93f8-490a-9a91-62f12f783e2c&groupId=4791121d-01f2-49ad-99fc-9fa3bab7fc3f&autoAuth=true&filter=MyServer eq 'MSSQLSERVER2017' and MyDatabase eq 'TestDB' and EmployeesList/ActionCode eq '1' and EmployeesList/UserID eq '1' and EmployeesList/Alphabet eq 'All'
【问题讨论】:
-
[app.powerbi.com/… eq 'MSSQLSERVER2017' and MyDatabase eq 'TestDB' and EmployeesList/ActionCode eq '1' and EmployeesList/UserID eq '1' and EmployeesList/Alphabet eq 'All' ] **The上面的 URL 向我显示数据,但它没有在我更改参数值时过滤记录......即 ActionCode = 1 或 ActionCode = 2 Alphabet = "All" 或 Alphbet = "B" **
-
使用 URL 查询字符串参数可以过滤报表,但它们不会更改报表参数值,即不会使用 URL 中传递的值重新执行存储过程。
标签: report powerbi powerbi-embedded powerbi-desktop power-bi-report-server