Forum Discussion
Unable to do Query Folding with Incremental refresh
Hi All,
I'm setting up an incremental refresh for the SAP data source and I am unable to fold the query. I have tried 2 approaches.
1st I used the sample code from the official doc and tried to apply the filter within the m code with the column being the text data type and 2nd I changed the column data type to date/time and then applied parameters in the power query (attached doc with m-code).
We are trying to include the data for the last 3 years as per client needs, if there is any other approach I can use then I'm open to ideas as well. My client has a Pro workspace so I'm restricted to that.
Appreciate the response.
Thanks for your response. I could do query folding using the sample m-code as per the doc.
Also, I want to highlight that if query folding is not happening then incremental refresh won't have any use, this has been my understanding always and I just confirmed with Microsoft ticket as well.
https://learn.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-overview#time-limits
3 Replies
- lbendlin
Super User
Query Folding is desired for Incremental Refresh, but not required. What is required is that your Power Query includes filters for RangeStart and RangeEnd that are meaningful for the formation of the partitions in your dataset.
So for example if you have yearly files from your SAP data source then you need to convert that year information in your meta data (for example as part of the file name) to a DateTime value (first day of the year, for example) for RangeStart and then add one year for RangeEnd.
- AnkitKukreja
Super User
Thanks for your response. I could do query folding using the sample m-code as per the doc.
Also, I want to highlight that if query folding is not happening then incremental refresh won't have any use, this has been my understanding always and I just confirmed with Microsoft ticket as well.
https://learn.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-overview#time-limits
- lbendlin
Super User
if query folding is not happening then incremental refresh won't have any usePlease provide more details. I don't see anything in that article corroborating this statement. I have a 25GB (and growing) dataset that seems to say otherwise.