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
I'm getting this error: "Formula.Firewall: ...(not important).. references other queries or steps, so it may not directly access a data source"
I've read about others having the same issue but I can't wrap my head around how to solve the issue in my case. My query looks like this with only one step:
let
Source = Table.AddColumn(Query1, "Custom", each Json.Document(Web.Contents("https://path-to-api/", [RelativePath=Text.Combine({Number.ToText([pages.id]), "/tickets"}), Headers=[Authorization=Bearer tokenid"]])))
in
Source
My guess is that the error occurs because i reference the api endpoint and "pages.id" in the same query? But I can't figure out how to do instead since I'm using "each" and looping through the table. Any ideas?
Solved! Go to Solution.
I'm referencing another query that's also doing an API call, when I moved that call into this query as well the issue was solved.
I'm referencing another query that's also doing an API call, when I moved that call into this query as well the issue was solved.
@Anonymous , Are trying pagination?
refer old solution, if they can help
https://community.powerbi.com/t5/Power-Query/Formula-Firewall-error/m-p/919550
https://community.powerbi.com/t5/Power-Query/Formula-Firewall-Error/m-p/1061155
https://community.powerbi.com/t5/Developer/Formula-Firewall-bug/m-p/1576612
refer
https://medium.com/@marktiedemann/how-to-do-pagination-in-power-query-430460c17c78
Thanks for the answer, I tried to use a function instead as suggested in the first article so my function looks like this:
(ticketId) =>
let
Source = Web.Contents("https://path-to-api/", [RelativePath=Text.Combine({NumberToText(ticketId, "/tickets"}), Headers=[Authorization="Bearer-token"]])
in
Source
And then the original query changed to this
let
Source = Table.AddColumn(Query2, "Custom", each JsonDocument(GetConnectedTicket([pages.id])))
in
Source
but I'm still getting the same error, any idea why?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 33 | |
| 29 | |
| 26 |
| User | Count |
|---|---|
| 134 | |
| 104 | |
| 63 | |
| 60 | |
| 55 |