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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Formula.Firewall error using R Script

Hi,

I am calling a simple R script (for regular expressions) to combine with my source query. Latter is based on ODBC connector to AWS Simba Athena user DSN. All the datasources privacy level is set to same as "Organizational". I get the formula.firewall error. 

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

I have tried the technique prescribed in some of the online blogs to separate out the sources - stage the source query and wrap it inside a Function and then use that function output query to combine with R script. This also ended up with same error.

I don't want to "ignore the privacy levels" as I don't know if/what/how my source AWS data might be transferred to open source R environment and potentially putting it at risk. We also eventually need to publish this report in Power BI service hence the solution should work in both the desktop and the service.

Can anyone suggest any workable solution for this?

Below is my query dependency diagram for reference.

nirmit27_0-1646212376161.png

 

Thanks

Nirmit

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @v-yalanwu-msft Yes read that post and few others, it didn't work out in exact same way.

For others, I have resolved the issue using below post and modifying my query dependencies as shown below:

https://sqlitybi.com/formula-firewall-error-referencing-queries-r-python-scripts/

nirmit27_0-1646733059206.png

 

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @v-yalanwu-msft Yes read that post and few others, it didn't work out in exact same way.

For others, I have resolved the issue using below post and modifying my query dependencies as shown below:

https://sqlitybi.com/formula-firewall-error-referencing-queries-r-python-scripts/

nirmit27_0-1646733059206.png

 

 

 

v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

Ken Puls blogged about this here

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

 

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

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.