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! It's time to submit your entry. Live now!
Hi,
last Power BI desktop update introduced parameters. I changed hard coded Server name in pbix and replaced it with parameter SERVER_NAME. After this change refreshes through Enterprise Gateway took unusually long time and finally resulted in error for unknown reason. Took me 2 days to resolve this (did other changes as well)
Server name as a parameter is a must for moving from dev to production.
Did anyone encounter the same issues? I already posted an idea to fix so please vote if you find this useful
Thanks
Jiri
hi @jirineoral,
Could you elaborate more about the problem/suggestion? Was it a Gateway issue that was causing this refresh to fail?
Hi @dimazaid,
I'm importing data from SSAS Multidimensional. In my .pbix file I had server name as constant for all my MDX queries. Refresh worked ok. After introduction of parameters. I replaced server name with parameter passing the same value of registered data source in Power BI Enterprise Gateway. Refreshes started to fail. Because I did multiple steps lately (updated Gateway as well) I didn't know what the problem is.
Yesterday I simulated same steps on demo data before changing server name to parameter value. Refresh works, after change fails witch unknown error in EG.
So I suspect that this is problem of EG that it somehow can't read properly parameter value? Not sure.
Jiri
@jirineoral - While I realize it is a workaround, it would be interesting if you tested the techique I posted to see if the EG's problem with parameters is a general problem or if it is specific to the use of the parameter as the server name/connection string.
As a work-a-round, you might try something like this:
let
DevSource = Csv.Document(File.Contents("C:\temp\powerbi\test_dev.csv"),[Delimiter=",", Columns=2, Encoding=1252, QuoteStyle=QuoteStyle.None]),
ProdSource = Csv.Document(File.Contents("C:\temp\powerbi\test_prod.csv"),[Delimiter=",", Columns=2, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers Dev" = Table.PromoteHeaders(DevSource),
#"DevResult" = Table.TransformColumnTypes(#"Promoted Headers Dev",{{"Column1", type text}, {"Column2", Int64.Type}}),
#"Promoted Headers Prod" = Table.PromoteHeaders(ProdSource),
#"ProdResult" = Table.TransformColumnTypes(#"Promoted Headers Prod",{{"Column1", type text}, {"Column2", Int64.Type}}),
result =
if Environment = "Dev"
then #"DevResult"
else #"ProdResult"
in
#"result"This uses a parameter called "Environment" that can either be "Dev" or "Prod"
Thanks @Greg_Deckler,
but I don't need workarounds. I already contacted support with this problem, I was just curious, if anyone has the same problem as I do. Your solution requires rewriting M code and if I need to to this, I can rewrite the server name directly.
Jiri
| User | Count |
|---|---|
| 53 | |
| 40 | |
| 35 | |
| 24 | |
| 22 |
| User | Count |
|---|---|
| 136 | |
| 111 | |
| 58 | |
| 43 | |
| 38 |