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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
jdc_123
Regular Visitor

M Query Parameterized - Firewall error

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

 

Dynamic Query to Microsoft SQL Server DB:

selectedLocation = Location points to a query-driven parameter list in Power BI. I want to pass the parameter user selection to the below M Query (DYNAMIC QUERY) at runtime.

 

let
selectedLocation = Location,
query = "select location_id, Location_Desc from location where deleted = 0",
dynamicFilter = Text.Combine({" AND Location_Desc =(","'", selectedLocation,"'",")"}),
finalQuery = Text.Combine({query, dynamicFilter}),
Source = Sql.Database("***IP***", "***DATABASE***", [Query= finalQuery])
in
Source

 

PRIOR TROUBLESHOOTING: Adjusted data privacy settings, which did work LOCALLY - BUT THIS IS NOT A VIABLE SOLUTION FOR PUBLISHING TO THE POWER BI SERVICE - This is only a fix for locally running the pbix file. Is there a way to adjust a privacy setting for the location paramter so that it can 'merge data' with the SQL Server connection? I am not following where the data privacy discrepancy is since this is a single data source.

 

Thank you!

 

 

2 REPLIES 2
Anonymous
Not applicable

Thanks for the reply from lbendlin.

 

Hi @jdc_123  , 

Have you solved your problem? If so, can you share your solution here or mark the helpful reply to help other members find it faster? Thank you very much for your kind cooperation!

 

Best Regards,
Zhu

lbendlin
Super User
Super User

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.