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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

I cannot get the most simplest measures or visuals to execute using Direct Queries with Redshift. An example query is getting the count of the primary key of a table while filtering on a column of type boolean. The measures/visuals work just fine through import.


Is this a known issue with the Redshift connector? Are there any workarounds to this issue? Is there an ETA on when a fix to this issue can be released? Help resolving this would be greatly appreciated.


Power BI Desktop Version: 2.66.5376.2521 64-bit (February, 2019)

Status: Investigating

@Anonymous ,

I have contacted this issue internally, I will post back once I get any feedback.


Status changed to: Investigating
Helper IV

@v-yuezhe-msft , I am experiencing the same issue with the Amazon Redshift connector in Direct Query mode. Including any Text column in a visual causes this error - for a slicer, table or matrix visual. Number columns seem to work fine.


I am also using the Feburary 2019 Power BI Desktop, 64-bit.

Helper IV

The problem still exists in 


Version: 2.67.5404.801 64-bit (March 2019)


Not applicable

@v-yuezhe-msft  I'm in the same boat, we have this same issue when working with Redshift in DirectQuery and it's frustrating.

Frequent Visitor

We have the same issue here and I have the November 2019 update

Frequent Visitor

Turned out that the data types used in Athena must be one of the supported data types in Redshift


Changing strings to varchar and integers to decimal data types got the direct queries working in Power BI against Redshift spectrum.

Regular Visitor

Hi youssef_youssef, I'm having the same issue here in November 2020, only number fields works in Redshift Spectrum -> Power BI. Can you elaborate on those string/varchar changes? 

Frequent Visitor

Hi rafaelruivo,


I didn't have issues with Redshift Spectrum as long as you are sticking to the data type supported by Redshift. For strings, you need to define the columns as varchar or nvarchar in Athena/AWS Glue data catalog. string data type is not understood by redshift spectrum.