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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Lucas234
Regular Visitor

Query folding for SQL database, Enabling? View Native Query

Dear Community,

I try to set up the incremental refresh but even though all is pointing to that query folding should be working, it seems that its not.


Please note that I have limited understanding to SQL database architecture and Power Bi.


I work on SQL database 2017, standard version. I write basic SQL queries like SELECT *, FROM table, even with this the buttom 'View Native Query' is disabled.

I tried to run 2 queries one with all tables and then 'choose columns' in power query, and second where i select columns in a query and i can clearly see difference in speed of data load so the query folding is not happening.

I wonder what can i do?
Thank you in advance for any help

1 ACCEPTED SOLUTION

Hi @Lucas234 

I think the select statement in the Source line may be the issue. Could you try this...

let
Source = Sql.Database("X1", "X2"),
RunSQL = Value.NativeQuery(Source, "SELECT * FROM [dbo].[X3$Machine Center]", null, [EnableFolding = true] )
in
RunSQL

 Hope this helps.

View solution in original post

4 REPLIES 4
Lucas234
Regular Visitor

Hi, thank you very much but it seems that it didnt work. more details below. 

let
Source = Sql.Database("X1", "X2", [Query="
SELECT *
FROM [dbo].[X3$Machine Center]
"]),
RunSQL = Value.NativeQuery(
Source,
"SELECT * FROM [dbo].[X3$Machine Center]",
null,
[EnableFolding = true]
)
in
RunSQL

 

 

So i have structured it this way, but i get the error message:

"Expression.Error: Native queries aren't supported by this value.
Details:"

In fact i tried this function as a custom step i beleve its the same but also was no success. Any further ideas? More help much appreciated!!

Hi @Lucas234 

I think the select statement in the Source line may be the issue. Could you try this...

let
Source = Sql.Database("X1", "X2"),
RunSQL = Value.NativeQuery(Source, "SELECT * FROM [dbo].[X3$Machine Center]", null, [EnableFolding = true] )
in
RunSQL

 Hope this helps.

Great! Thank you very much!!

collinsg
Solution Sage
Solution Sage

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.