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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
martinocando
New Member

Couldn't fold the expression to the datasource using Dremio

Hi, 
I'm using On Prem Dremio via the PB Dremio driver, and I had a working gauge chart when the table was in Load mode, but now changed to Direct Query, and it throws the error OLE DB or ODBC error: [Expression.Error] We couldn't fold the expression to the data source.

 

Is a super simple calculation:

Turn Time = DATEDIFF(gate_transactions[entered],gate_transactions[exited],MINUTE)

 

Both entered and exited are timestamps in Dremio, and are recognized as such in PBI.

 

I tried casting the timestamps as text, then creating columns in PBI with TIMEVALUE, but it throws the same error.

I ran out of options. Any ideas?

1 ACCEPTED SOLUTION
martinocando
New Member

Well, that didn't work initially, but the underlying reason was that I had a conditional formatting in place using a columns that changed when I switched from Load to Direct Query storage mode, but it makes more sense to do the calculation in the SQL, so I reset the format of the chart, and it worked.

Thanks!

View solution in original post

2 REPLIES 2
martinocando
New Member

Well, that didn't work initially, but the underlying reason was that I had a conditional formatting in place using a columns that changed when I switched from Load to Direct Query storage mode, but it makes more sense to do the calculation in the SQL, so I reset the format of the chart, and it worked.

Thanks!

amitchandak
Super User
Super User

@martinocando , Direct query has few limitations in terms of what all column calculations one can do. It allows you write a SQL, you can do the same in Sql and try

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.