Forum Discussion
OLE DB or ODBC error: [Expression.Error] We couldn't fold the expression to the data source
Hi BL123456 ,
I noticed that you used DirectQuery connection mode.
Some functions are not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules, such as COUNTROWS and ISFILTERED. This can lead you to errors like this.
COUNTROWS function (DAX) - DAX | Microsoft Learn
Similar post: Solved: We couldn't fold the expression to the datasource ... - Microsoft Fabric Community
Also, try upgrading Power BI Desktop to the latest version and see if this issue persists.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
Thank you for your reply.
The thing is the issue happens only for Unicode characters. I believe that in case we had an issue with the DAX function, it would have happened for all encodings.
Do you have another idea?