Forum Discussion
Reports don't work post deploying from DEV to UAT using Deployment Pipeline
Visuals throw below error post deploying them to UAT but everything works fine in DEV.
Expression.Error: We couldn't fold the expression to the data source. Please try a simpler expression.. ;We couldn't fold the expression to the data source. Please try a simpler expression.. The exception was raised by the IDbCommand interface.
This was not there till last week, everything were smooth but all of a sudden getting such error.
Please check and do the needful.
6 Replies
- AnonymousNot applicable
Hi PRAVISH_SARAVAN ,
The error message you provided indicates that the expression you’re using is too complex for Power BI to fold to the data source. This error is common when using Direct Query mode in Power BI.
To fix this error, you can try the following:
- Simplify your expression by removing any unnecessary complexity.
- Avoid using complex transformations in the Power Query Editor.
- Ensure that your data model is as simple as possible.
- Implement as much of the logic for your calculations in your data source and reduce the amount of DAX you need to write.
If the error persists, you can try writing your DAX in a different way in the hope that Power BI will be able to fold it.
For more details, you can read related document: Chris Webb's BI Blog: Understanding The “We Couldn’t Fold The Expression To The Data Source” Error In Power BI (crossjoin.co.uk)
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- PRAVISH_SARAVANFrequent Visitor
Thanks for the response. But the strange worry is,it's working smoothly in DEV workspace but why the issue raises in the TEST workspace alone post deployment.
If I publish directly from DESKTOP(Pointing DEV workspace) it's working but this issue occurs when I deploy to TEST workspace or any new workspace using PBI DEPLOYMENT PIPELINE.So I'm confused on this part.
Also the calculcation used is normal CALCULATE(<AGGREGATE>,<FILTERs>) format- Brunner_BI
Impactful Individual
PRAVISH_SARAVAN the first thing to understand here is that query folding happens in your Power Query, it has nothing to do with any calculations or DAX, measures etc.
Meaning that something in your backend/PQ breaks the DirectQuery.
Did you define some parameters there that might have changed when you pushed to UAT?
You should download whatever you have in UAT and analyze the issue in Power BI Desktop, because exactly that file cannot execute the direct query.
What I am guessing the problem is is that your UAT report was automatically binded to a different dataset. Do you have another pipeline for your datasets?
The error you are mentioning is quite weird though, only one visual is throwing this? Can you provide a screenshot?