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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.