Skip to main content

Power BI

New

parameter datasource

Vote (9) Share
's profile image

on 18 Nov 2017 00:25:51

To be able to use a parameter value as servername in a SQL connection.
Change the parameter value, and all datasets bound to that datasource using this parameter as target gets updated at once (using the same credentials).

Comments (1)
's profile image Profile Picture

c8408343 a6a0-40c4-b9f9-232c865e63a6 on 05 Jul 2020 23:38:44

RE: parameter datasource

That is already possible via M: I have a parameter "dbEvironment" with values prod, acc, sandbox, and use it (Advanced Editor):

let
Source = Sql.Database("sql-" & dbEnvironment & ".database.windows.net", "main-sqldb-datamart-" & dbEnvironment),
DIM_COMPANY= Source{[Schema=opco &"_Finance",Item="DIM_COMPANY"]}[Data]
in
DIM_COMPANY