Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Formula.firewall

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?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

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.

amitchandak
Super User
Super User

@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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

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?

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.