Forum Discussion
Incremental Refresh
I followed multiple tutorials online about this and I thought I did everything in order. Can you look at this code (see image) and maybe suggest how to adjust it because your last post kind of confused me because I do have date parametars in my query as I am requesting data from jan 1 until today but only want last few dats to be live and eveything else to be archive so it doesnt need to be refetched on every refresh since that data never changes
- lbendlin2 years agoSuper User
Assign RangeEnd to currentdate and RangeStart to previousdate.
Not sure which tutorials you refer to, but this one here is pretty good.
Troubleshoot incremental refresh and real-time data in Power BI - Power BI | Microsoft Learn
- stribor452 years agoPost Prodigy
But assigning previous and current date for those values will call API endpoint and get data from April 1 to
today. How would I get data from Jan - March?
- lbendlin2 years agoSuper User
The Power BI service will do that automatically during the incremental refresh, supplying the appropriate dates for each partition.
- stribor452 years agoPost Prodigy
sorry previousDate is an extra code that I should have commented out. my bad I apologize. This is what I have now
- lbendlin2 years agoSuper User
Replace line 18 with RangeStart and line 19 with RangeEnd. Drop the CurrentDate calculation, it is not required.