Forum Discussion
Query Folding error in Direct Query
- 1 year ago
Hi Fern_21,
The problem here isn’t the syntax of your DAX expression, but the limitations of calculated columns and model transformations in DirectQuery mode.
When using DirectQuery, calculated columnsare not pushed down to the data source — they’re evaluated in the Power BI engine after the data comes in. This breaks filtering because filters need to be translated into SQL and sent to the source, and your concatenated column doesn’t exist in the actual SQL schema.
1. Try creating the concatenated column in Source database (SQL).
2. Create Calculated column in Import mode as direct query will not support it
3. Use both fields in separate slicers/filters
🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!
Hi Fern_21,
The problem here isn’t the syntax of your DAX expression, but the limitations of calculated columns and model transformations in DirectQuery mode.
When using DirectQuery, calculated columnsare not pushed down to the data source — they’re evaluated in the Power BI engine after the data comes in. This breaks filtering because filters need to be translated into SQL and sent to the source, and your concatenated column doesn’t exist in the actual SQL schema.
1. Try creating the concatenated column in Source database (SQL).
2. Create Calculated column in Import mode as direct query will not support it
3. Use both fields in separate slicers/filters
🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!
- Fern_211 year agoHelper V
Hi grazitti_sapna !
Is it better to avoid using calculated columns in DirectQuery mode?
I also get an error for the unpivot operation.
Calculated columns and unpivot are not directly supported in DirectQuery?
Thanks- lbendlin1 year agoSuper User
You should avoid any transforms that break query folding.