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
Hello,
I have not been able to find a solution to my problem even tho there are similar solved problems in this forum.
What I am trying to do is use parameters (from cell*s or table*s) in an url.
To define the parameters I tried two different solutions.
The first one was to write the value in a table and get the value via a Query.
It looks like this:
let
Source = Excel.CurrentWorkbook(){[Name="TestenParams"]}[Content],
TestParam1 = Record.Field(Source{0},"Start")
in
TestParam1
The other one was defined by using the built-in option of the Power Query Editor.
I would prefer to use the first variant but for testing purposes I tried both.
The next step was trying to replace a part of the url with the parameter.
A simplified example of the important part of the Query would look like this:
let
TestParam1 = Start,
Source = Json.Document(Web.Contents("https://someurl.com/somecategory/64dfg8d484-4fsd4-fwewtg1w8/records?fromHere="&TestParam1&"&toHere=1525426100", [Headers=[Accept="*/*", #"Content-Type"="application/json"]])),
#"Converted to Table" = Record.ToTable(Source),
For some reason I have not been able to create a working url using parameters.
Most of the time I get the "Expression.Error: We cannot apply operator & to types Text and Number" error.
Why am I not able to use parameters this way?
Thank you.
LPLA
Solved! Go to Solution.
Source = Json.Document(Web.Contents("https://someurl.com/somecategory/64dfg8d484-4fsd4-fwewtg1w8/records?fromHere="& Text.From(TestParam1) &"&toHere=1525426100", [Headers=[Accept="*/*", #"Content-Type"="application/json"]]))
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Source = Json.Document(Web.Contents("https://someurl.com/somecategory/64dfg8d484-4fsd4-fwewtg1w8/records?fromHere="& Text.From(TestParam1) &"&toHere=1525426100", [Headers=[Accept="*/*", #"Content-Type"="application/json"]]))
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Thanks a lot. I was searching for some kind of conversion but couldn't find it.
Unfortunately this created a new issue.
After using the parameter I get the following error:
Formula.Firewall: Query 'Testen' (step 'Expanded Value.chargebacks') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.
I already got this error when trying something very similar, but I could'nt find a way to solve it.
The solution https://community.powerbi.com/t5/Desktop/Formula-Firewall-Query-references-other-queries-so-it-may-n... seems to be correct but I can find the "Privacy" tab when going to File -> Options -> General -> Privacy Settings... but there isn't really anything for me to turn off or on.
I'll try to get this fixed because I'm trying to automate some of the time consuming steps in my workflow.
Still me original problem was solved by CNENFRNL so I will tag it as the solution.
Thank you.
LPLA
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!