https://docs.microsoft.com/en-us/rest/api/power-bi/reports/updatereportcontent#sourcetypeenum
我使用的电源BI本地应用程序做这个任务。
首先是关于问题#2 - 你可以在你有qazxsw POI看到,qazxsw POI是唯一可能的值。
关于你的第一个问题 - 你不能这样做直接使用API。但是,您可以使用文本值的参数(让我们将其命名为ExistingReport
)抱着你要选择的列的名称。修改M个查询通过更改其取出由数据库中的数据:
至:
ColName
然后使用let
Source = Sql.Database(ServerName, DatabaseName, [Query="select Col1, Col2, ColA from Sales.Orders"])
in
Source
或let
Source = Sql.Database(ServerName, DatabaseName, [Query="select Col1, Col2, " & ColName & " as ColA from Sales.Orders"])
in
Source
API改变Update Parameters参数的值(让我们说Update Parameters In Group)。如果是进口的数据集,则必须使用ColName
或ColB
后刷新。