cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
markive
Advocate II
Advocate II

Formula.Firewall: Query references other queries, so it may not directly access a data source.

I am getting the following error:

 

 

Formula.Firewall: Query 'Query1' (step 'Added Custom') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.

 

In my first query I am accessing an API to get a list of URLs. In the second query it uses this list of URLs to then go back to the API and request all of the data.

 

I understand what the complaint is, but how do I get around it? I am actually always hitting the same domain for both queries, but maybe it doesn't know that. I suppose it wouldn't know that until runtime.

 

I have read that in Excel PowerQuery you can go to:

 

File=>Options and Settings=>Options and set the Ignore Privacy Levels option.

 

But no such option seems to exist in Powe BI Desktop. Does anyone know what I'm doing wrong or how I can get around this restriction, it seems like a common usage scenario?

 

 

 

1 ACCEPTED SOLUTION

 

Ken Puls blogged about this here

http://www.excelguru.ca/blog/2015/03/11/power-query-errors-please-rebuild-this-data-combination/



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

37 REPLIES 37
sarsay
New Member

DaniMak1608
Frequent Visitor

Six years later and the Privacy Option is still the (only) necessary fix to solve this issue. 😏

Is it going to cause any problem if the privacy level setting is turned off?? 

The privacy settings are designed to prevent accidentally sending sensitive data somewhere you shouldn't. Eg.  Imagine you have a table in SQL with staff details including salaries. You write a query that joins this data to Facebook data (for some reason). The privacy settings will stop the private data in SQL being sent to the open data source, Facebook. As long as you don't have any such queries, turning off the privacy settings will have no impact. Eg, as long as all your data sources are internal to your organisation. 



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

@MattAllington 

Thanks Matt!! That is very clear explanation!! 

Hennadii
Helper IV
Helper IV

Hi @markive , I had the same issue as you in 2016. Fortunately in 2020 there is Privacy Levels option which can be changed. If set it to "Ignore the Privacy Levels and potentially improve performance" the issue becomes resolved.

andrewbrick
Advocate II
Advocate II

For anyone still experiencing this issue, under File > Options, select Privacy, and if it's appropriate, select Ignore privay levels.  Even after following all the other suggestions referenced in this thread, I still got an error when refreshing.  It worked when I was in the Query Editor just fine (no errors), but refreshing from the regular report view would fail.

thank you

I can not believe this do work, and no failure rasied after clicking apply change. thanks, buddy!

Anonymous
Not applicable

The advice provided in this blog post now appears to be running contrary to experience in Power BI.

 

A query that contains all the Web.Contents calls a query needs leads it to function correctly. The splitting of the different Web.Contents calls into seperate queries before being merged into one final query leads an error to be thrown.

steve_honey
Advocate I
Advocate I

In case it helps others I ran into this issue after adding a non-supported/unofficial custom connector into PBI desktop and then trying to run queries against SharePoint files. 

Removing the custom connector from the local Documents > Power BI Destop > Custom Connectors folder got rid of the issue for me. (Note I didn't have any quries using the custom connector, just the fact it was there seemed to trigger the firewall thing).

david7f
Frequent Visitor

Thanks for the solution, I was struggling to solve this and now it works

MariyaSal
Advocate I
Advocate I

Please try the following in Power BI Desktop:

File -> Options -> Privacy -> Select “Ignore Privacy Levels…”

It helped me.

Fantastic! This saved my day (and most of yesterday 🙂 )

Hello,

 

I did this privacy level change, it solved for Power BI Desktop refreshes, but web refresh is still failing due to the same error.

This is the article previously referenced in this thread:

https://www.excelguru.ca/blog/2015/03/11/power-query-errors-please-rebuild-this-data-combination/

I confess I had to read it a few times to get it.

 

from the article by Ken Pulsfrom the article by Ken Puls

Basically, each query needs to be loaded into a staging query first. Then, you can combine these staging queries.

 

Fred

 

All of my data retrievals are now done in external functions

  • edicated functions which also do some manipulation of the data before returning it
  • a standard fLoadSheet function which is simply passed the name of a sheet in the spreadsheet and loads and returns it

However, yet again, I had a problem with this frustrating error. I called a standard function to return some parameters from a parameters sheet. Suddenly I got the Firewall error.

 

Given that I have written some VERY complicated scripts which retrieved data from various sources and worked no problem but written other scripts which are not (seemingly) as complicated but have failed with this error, I am still of the opinion that this is Microsoft's catch-all, can't cope error message!

 

Also, I sometimes get this error when stepping through the code (in the "advanced editor") but not when running the script, explain that!

I've just had it happen again ... twice!

I edited an existing script.

I didn't reference any additional (external) data.

I took a column creation out of a group statement and created it in the next step, the idea being to check a result from the group creation, something you can't do inside the group creation.

I also added a step inside an existing IF statement to check if the new column (which can be null or a record) was null before checking the contents of the column.

That's it, that's all I changed.

It failed with the usual error.

I changed four other scripts (which reference the same data but output different results) in the same way and they worked fine.

Even more bizarrely, one other script which I changed in the same way worked fine in the "Advanced Editor" and then failed when I quit back to Excel and ran the script!

This all adds weight to my belief that this really is a default "I can't cope" error message.

What's even more frustrating is if you read the actual error message it states "references other queries or steps" ... every step references other steps, so this is a meaningless error message!

It also means that I have literally no idea what the problem is or how to resolve it.

So frustrating.

You're right, this is a misleading "can't cope" messagem for a Power BI bug.

 

If this issue was only due to referencing other queries, nobody would be able to solve it, as many have, by using staging queries, custom functions, or changing the steps order.

This is madness.

 

I have tried using staging queries, and also making data retrieval in custom functions. None worked.

 

I'll probably have to start using a data lake to make simple merges between data sources, only because of this issue.

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!