Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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