Forum Discussion
Issue with Query Folding for Incremental refresh
- 1 year ago
Hi rasika_pawar,
To resolve the issue you encountered in Power BI, the best approach is:
1) Keep all foldable transformations (like parameter filters, column removal) in a separate base query.
2) Rename this base query (e.g., SalesData_Staging).
3) Right-click on the base query → choose "Reference" to create a new query (e.g., SalesData_Final).
4) Apply all non-foldable steps (e.g., custom columns, merges, groupings) only in the referenced query.
5) This prevents re-filtering and keeps parameter-based filters intact.
6) Disable loading of the base query (right-click → uncheck "Enable Load") to reduce memory usage.
7) Load only the final query (SalesData_Final) into the data model In the base query, use "View Native Query" after each step to verify that query folding is still activeRegards,
Chaithanya.
Hi rasika_pawar - You're on the right track by trying to implement incremental refresh using RangeStart and RangeEnd, and enabling "View Native Query" is critical for it to push filters down to the source (folding). However, mixing types and complex transformations in Power Query is likely breaking query folding.
Suggest few points:
Do not cast columns to text or do calculations before filtering.
Check "View Native Query" immediately after the filter step.
If needed, construct a dynamic SQL query using Value.NativeQuery.
Hope this helps.
- rasika_pawar1 year agoFrequent Visitor
Thank you for your suggestion.
But I already tried the ways you suggested. I duplicated the table and delete all the transformations till Navigation and then filtered the data using parameters due to which query folding was enabled. But when I applied the other transformations steps then 2 things happened one is the data which is filtered by using parameters, got filtered back by the transformations applied after filter. And view native query was disabled for those transformations.