cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DrBiker Regular Visitor
Regular Visitor

Redshift and data folding error

I am using a redshift database, and I can connect to that OK in Power BI Desktop.  My problem comes when I try to use some calculated fields; I have simplified some down to try and find the error so for example:

     Measure 2 = COUNT(evhc[flag]) 

 

Where flag is an integer.  This give the error:

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

 

I assume that when folding this query that Power BI is using SQL syntax rather than Redshift?

 

Is this a bug or am I missing something?

 

p.s. I know I can do this without using a measure, but this is a test as my measures are more complex than this.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
pqian Senior Member
Senior Member

Re: Redshift and data folding error

@DrBiker I'm assuming you are connecting to RedShift in DirectQuery mode. This error is thrown when some aggregation (in this case the count) is been translated to M for execution, so it's not really SQL yet. 

 

I think this is related to a bug that we know about, is [flag] a nullable column? Counting on nullable column wasn't working in the preview bits, we will be fixing it in the next release.

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Redshift and data folding error

Redshift is in preview mode, so I guess it is a bug.    Send a frown using the desktop frown so the developers can look at it.



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
pqian Senior Member
Senior Member

Re: Redshift and data folding error

@DrBiker I'm assuming you are connecting to RedShift in DirectQuery mode. This error is thrown when some aggregation (in this case the count) is been translated to M for execution, so it's not really SQL yet. 

 

I think this is related to a bug that we know about, is [flag] a nullable column? Counting on nullable column wasn't working in the preview bits, we will be fixing it in the next release.

View solution in original post

arify Established Member
Established Member

Re: Redshift and data folding error

@pqian is right, this should be fixed in the next release (~end of august). Thanks

WaqasP Visitor
Visitor

Re: Redshift and data folding error

Has this been resolved?

sabedin Regular Visitor
Regular Visitor

Re: Redshift and data folding error

Hi,

 

I am getting the same error message (although different DAX formula!!!

 

Is this fixed or not?

 

Thank you!

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 388 members 3,384 guests
Please welcome our newest community members: