Forum Discussion
Power BI advaced query Editor
good morning
I am searching if it possible to use variables, in the advanced query editor, something like this:
instead of:
------------
let
Origine = Sql.Database("99.99.99.99", "Mydb", [Query="select data from mytab where code = 66....
in
Origine
something like this:
---------------------
let variab = 66;
let
Origine = Sql.Database("99.99.99.99", "Mydb", [Query="select data from mytab where code = variab .....
in
Origine
or any doc about ...
thanks
Yes, just add the named variable in a previous step, for example:
let
myVar = "66",
Source = "myUrl" & myVar
in
SourceThis returns "myUrl66"
4 Replies
- deldersveldResident Rockstar
Yes, just add the named variable in a previous step, for example:
let
myVar = "66",
Source = "myUrl" & myVar
in
SourceThis returns "myUrl66"
- perporHelper V
thanks, it works... (the best would be to have global variables, for all the report, but this is already helpful..)
- deldersveldResident Rockstar
Try looking into parameters. They can be used across queries.