Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
Solved! Go to Solution.
Yes, just add the named variable in a previous step, for example:
let
myVar = "66",
Source = "myUrl" & myVar
in
Source
This returns "myUrl66"
Yes, just add the named variable in a previous step, for example:
let
myVar = "66",
Source = "myUrl" & myVar
in
Source
This returns "myUrl66"
thanks, it works... (the best would be to have global variables, for all the report, but this is already helpful..)
Hi @perpor,
If you have resolved your issue according the helpful reply, please mark it as answer, so other people can find workaround clearly.
Thanks,
Angelia
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.