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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
DiePic
Resolver II
Resolver II

Parameter Created from a query

Hi all

I create a parameter from a query and result is correct

DiePic_1-1707905094143.png

 

 but if I try to insert this parameter in a ms-sql query to retrieve records, I have this error:
(Formula.Firewall: Query 'Controllo_DatiATT_xCommessa' (step 'Source') references other queries or steps, therefore cannot directly access a data source. Recompile the data combination.)

DiePic_2-1707905325401.png

 

If I create a normal parameter inserting my data, it's working.

 

Where I'm in wrong? 

Any suggestion or help will be appreciated.

thanks in advance



1 ACCEPTED SOLUTION
v-junyant-msft
Community Support
Community Support

Hi @DiePic ,

To resolve this issue, you can try the following steps:

Adjust Privacy Levels: Set the privacy levels for your data sources to ensure they are compatible. You can do this by going to File > Options and settings > Query options > Privacy, and then setting the privacy level for each source. 

Combine Queries: If you're referencing other queries or steps, make sure that they are combined in a way that does not violate the privacy levels. This might involve restructuring your queries so that they are merged or appended within Power Query before being used in your SQL query.

Use Parameters Directly: Instead of creating a parameter from a query, try using the parameter directly in your SQL query. Ensure that you're using native query parameters correctly.
Use cascading parameters in paginated reports - Power BI | Microsoft Learn

If you continue to experience issues, could you please provide more details about how you're creating the parameter from a query and how you're attempting to use it in your MS-SQL query? Specifically, it would be helpful to know:

What is the exact method you are using to create the parameter from a query?
How are you inserting the parameter into your MS-SQL query?
Are you using any dynamic SQL or are you using a native query with parameters?

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-junyant-msft
Community Support
Community Support

Hi @DiePic ,

To resolve this issue, you can try the following steps:

Adjust Privacy Levels: Set the privacy levels for your data sources to ensure they are compatible. You can do this by going to File > Options and settings > Query options > Privacy, and then setting the privacy level for each source. 

Combine Queries: If you're referencing other queries or steps, make sure that they are combined in a way that does not violate the privacy levels. This might involve restructuring your queries so that they are merged or appended within Power Query before being used in your SQL query.

Use Parameters Directly: Instead of creating a parameter from a query, try using the parameter directly in your SQL query. Ensure that you're using native query parameters correctly.
Use cascading parameters in paginated reports - Power BI | Microsoft Learn

If you continue to experience issues, could you please provide more details about how you're creating the parameter from a query and how you're attempting to use it in your MS-SQL query? Specifically, it would be helpful to know:

What is the exact method you are using to create the parameter from a query?
How are you inserting the parameter into your MS-SQL query?
Are you using any dynamic SQL or are you using a native query with parameters?

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-junyant-msft 
with the option you suggest, I've solved my problem.

Thanks a lot

DiePic_0-1708012804016.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.