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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
vfx661
Advocate I
Advocate I

OLE DB or ODBC error: [Expression.Error] We couldn't fold the expression to the data source.

Sourcing data from snowflake using a native query built from m parameters, using folding:  
df = Value.NativeQuery(db, qry, null, [EnableFolding = true])

In power query it works fine and the data is visible.  However when I switch to power bi it gives me this error:
OLE DB or ODBC error: [Expression.Error] We couldn't fold the expression to the data source. Please try a simpler expression.

I've set the parameter values in power query to be the same as that coming from power bi. 
Why am I getting this error?

3 REPLIES 3
lbendlin
Super User
Super User

Don't forget there are at least four different query engines in play

 

- Power BI Desktop

- Dataflows

- Gateway

- Power BI service

 

Versions are rarely in sync, and it is very likely that the query plans differ ever so slightly across these implementations.  Stuff that "still works" on the desktop may be considered a bug, is "fixed"  on the service, and will then result in a slightly different experience etc.

To clarify - power query is the one 'attached' to power bi desktop - so I was thinking they'd be the same engine?

All four of them (five if you count DFgen2) use Power Query, and they can all be different.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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