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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AnjaW
Helper I
Helper I

Is OData no longer supporting Query Folding?

My semantic model no longer refreshes. I have made no changes whatsoever myself.

The error message is identical to those when a nested merge is performed on tables from different sources with restricted privacy levels.

Checking back on desktop I note that all tables from OData have the View Native Query disabled, even tables on which no transformations have been performed.

Have some default settings changed? How do I get the refreshes to work again?

I am really stuck! Thanks for any pointers in the right direction.

 

Failure details: The last refresh attempt failed because of an internal service error. This is usually a transient issue. If you try again later and still see this message, contact support.

Cannot convert value XXX of type Text to type Number.

1 ACCEPTED SOLUTION

Here's an example for Salesforce Objects

 

let
    Source = Salesforce.Data("https://login.salesforce.com/", [ApiVersion=48]),
    Account1 = Source{[Name="Account"]}[Data],
    #"Filtered Rows" = Table.SelectRows(Account1, each Date.IsInPreviousNDays([CreatedDate], 30))
in
    #"Filtered Rows"

This query allegedly doesn't fold

lbendlin_0-1715947042541.png

Running the diagnostics however reveals that it does indeed fold into custom SOQL. Check the "Data Source Query"  column.

 

Request:
GET https://xxx.my.salesforce.com/services/data/v48.0/query?q=SELECT Id%2CName%2CCreatedDate FROM Account WHERE ((CreatedDate>%3D2024-04-17T00:00:00-04:00) AND (CreatedDate<2024-05-17T00:00:00-04:00)) LIMIT 1000 HTTP/1.1

 

View solution in original post

11 REPLIES 11
AnjaW
Helper I
Helper I

Any idea what else could be the underlying issue to generate this error message:

I stress again, no changes have been made to the data model and it has been refreshing without issues for months...

AnjaW_0-1715950988540.png

 

Last service version change was on 5/12

 

lbendlin_0-1715954067394.png

 

But your error message clearly points to data quality issues on your side.

AnjaW
Helper I
Helper I

It's NOT folding. 

I used the following script from Brunner BI, who took it from Chris Webb.

 

GetMetadata = Value.Metadata(#"MY LAST STEP"),
    QueryFolding = GetMetadata[QueryFolding]
in
    QueryFolding

 

I will contact support as you suggested. Thanks for having help me getting to the bottom of this.

lbendlin_0-1715948236370.png

It's meaningless.  Check the actual query.

 

AnjaW
Helper I
Helper I

OK. And then? I don't see anything relating to SQL in the entire table. What should it look like if query folding is happening?

 

Here's an example for Salesforce Objects

 

let
    Source = Salesforce.Data("https://login.salesforce.com/", [ApiVersion=48]),
    Account1 = Source{[Name="Account"]}[Data],
    #"Filtered Rows" = Table.SelectRows(Account1, each Date.IsInPreviousNDays([CreatedDate], 30))
in
    #"Filtered Rows"

This query allegedly doesn't fold

lbendlin_0-1715947042541.png

Running the diagnostics however reveals that it does indeed fold into custom SOQL. Check the "Data Source Query"  column.

 

Request:
GET https://xxx.my.salesforce.com/services/data/v48.0/query?q=SELECT Id%2CName%2CCreatedDate FROM Account WHERE ((CreatedDate>%3D2024-04-17T00:00:00-04:00) AND (CreatedDate<2024-05-17T00:00:00-04:00)) LIMIT 1000 HTTP/1.1

 

Ahhh, I see. Thank you! You are right, it does still fold. 

So I am back in the dark why the refreshes are failing.

 

I appreciated your help. I have learnt a lot for the future. 

If you have a Pro license you can open a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi
Otherwise you can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues .

AnjaW
Helper I
Helper I

Thanks Ibendlin, this sounds a promising way forward. I am new to using the diagnostic tool. Can you help me how I can tell whether a custom SQL query is produced or not? I get a handful of diagnostic tables, which one is the crucial one? Which column to scan for what kind of entry. Thank you so much!

For starters you can use the agg table.

 

Don't forget to delete these table groups when you are done.

lbendlin
Super User
Super User

"view native query"  being greyed out is not necessarily an indicator that query folding is not happening.  To be absolutely sure run query diagnostics and check if a custom SQL query is produced or not.

 

If you have a Pro license you can open a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi
Otherwise you can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues .

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