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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
MKMA
Frequent Visitor

Formula.Firewall error issue

Hi, 

I've tried all suggested solutions on this error, but none worked. 

I have this line of code in my query: 

let
Date1 = StartDatePar,
Date2 = EndDatePar,
Source = Odbc.Query("dsn=SnowFlake", "select * from table
where 1=1 #(lf)
and SALE_DATE >= " & Date1 & "
and SALE_DATE < " & Date2 & "
")
in
Source

 As you can see there are power query parameters that are used directly in the snowflake query. I can't refresh it because I get this error: 

Query 'Raport' (step 'Source') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination. 

Here are all steps: 

MKMA_0-1725972456953.png

All source code permissions are set to "None". Is there a way to maybe edit the code to make it work? 

What is the reason behind this error? 
Please help me, I'm losing my head over this. 

6 REPLIES 6
lbendlin
Super User
Super User
MKMA
Frequent Visitor

I understand the problem and thanks for an interesting article, but it doesn't provide solution to my problem. The article says: 

 

To resolve, the code that combines between sources can’t be in the same partition as the sources and incompatible sources can’t be together in the same partition. The key to adjusting code to comply with these requirements is understanding where partition boundaries are drawn.

Unfortunately, the rules that define how code is partitioned are complex. A shortcut solution: If you encounter one of these errors, place the code specific to each data source in a separate query (one query per data source) and then reference those queries from another query that combines between them. 

 

Great. So I need to adjust my code and to be able to do that I need to understand more about partitions. The article doesn't say a word about how code is partitioned because it's "complex". It only provides a shortcut solution. In my case I don't know how to execute a shortcut solution and put one query per data source because I need to reference queries WITHIN the code right in the middle of it.

 

The article also says that I can set privacy settings to "Public" but as I said in the post - it doesn't work. 

 

So no solution for me. 

Use Odbc.DataSource instead of Odbc.Query and then provide the query later via Value.NativeQuery

MKMA
Frequent Visitor

Hi, I think I'm pretty close with my code, would you be willing to help me? I'd be very grateful.

MKMA
Frequent Visitor

Here is how I did it: 

 

let
// Step 1: Establish the connection using Odbc.DataSource
Source = Odbc.DataSource("dsn=SnowFlake"),

// Step 2: Define the query using Value.NativeQuery
Result = Value.NativeQuery(
Source,
"select * from table
WHERE 1=1 
AND SALE_DATE >= '" & StartDatePar & "' 
AND SALE_DATE < '" & EndDatePar & "' 
"
)
in
Result

 

I get either the same error or this one: 

MKMA_0-1726124224813.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors