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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
nicoolai
Frequent Visitor

Using column from one query in source of another query

I have a query where one of the columns in the results, is a list of table names.

I want to query ANOTHER source, using the distinct values of those tables, as a filter.

I have created the filter by 

Text.Combine(List.Distinct(FromSourceA[TableName]), "|")

This gives me a string with every tablename, seperated by |'s to create a regex.

My problem is using this value in the query string of another source.

I keep getting "Formula.Firewall: Query 'QueryName' (step 'StepName') references other queries or steps and so may not directly access a data source. Please rebuild this data combination." error when I do this.

I have tried to follow the following guide but not really been able to make it work in any way (maybe because I have to use the variable string in another source):

https://excelguru.ca/power-query-errors-please-rebuild-this-data-combination/

 

Any ideas on how I can solve this?

1 ACCEPTED SOLUTION
dufoq3
Super User
Super User

Hi @nicoolai, you can also turn off the firewall. Check Ignore... in Privacy tab.

dufoq3_0-1713622387155.png

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

View solution in original post

4 REPLIES 4
dufoq3
Super User
Super User

Hi @nicoolai, you can also turn off the firewall. Check Ignore... in Privacy tab.

dufoq3_0-1713622387155.png

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

That only works in the desktop though.

lbendlin
Super User
Super User

Short answer: Don't do that. You will never get this past the formula firewall monster.

 

Long answer:  You need to keep everything inside a single partition, and you need to obfuscate your sources.  Lastly you may need to use Expression.Evaluate with scope bending.  (If these words sound like gibberish to you then I highly recommend you consume Ben Gribaudo's Primer.)

Thank you, that is some very good advice. I will go through that primer.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.