Forum Discussion

stribor45's avatar
stribor45
Post Prodigy
2 years ago

Incremental Refresh

I am trying to test incremental refresh and in my power query i have data from January 1 2024 until today.  I also  have set up  parameters (RangeStart and RangeEnd) to be between April 1 - April 9.  I also have set up custom filter to filter data between these two dates. After this i have done "close and apply" to load this into my model where I also have set up increment policy (see attached) and published it in service. After this I did refresh in my model in desktop but in service I only see data for April and dont see any data from Jan, Feb and March. Any sugestions on what I am doing wrong?

 

 

 

53 Replies

    • stribor45's avatar
      stribor45
      Post Prodigy

      lbendlin do i do that from the desktop in my model? i tried that and it didnt work for me

      • lbendlin's avatar
        lbendlin
        Super User

        no, if you do that in the desktop it will reset back.  You have to refresh in the service to distribute the data across the defined partitions.

  • I am not disputing that fact. all I am saying that i only have lines between rows 37-50. My first 36 lines of code is juust code related to API call that gets the data. 

    • lbendlin's avatar
      lbendlin
      Super User

      That's exactly the point.  If you make the parameters part of your API call filters then you can implement your own query folding.

  • 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

     

     

     

  • I can't. because RangeStart and RangeEnd won't accept datetimes like these yyyy-MM-ddTHH:mm:ss-04:00 and API endpoint requires datetime in this format

  •  ok sorry about the delay on this. This is what I have now. (see the images).  Please let me know if this looks good to get data from January 1 to today and how many times i have to refresh to set up the archives

     

     

     

     

     

     

  • lbendlin I was able to make this work.  The only question I have is how do I ensure or check that the data in the red circle is archived (not fetched via subsequent refresh)? Thank you for your help on this issue I was having. 

  • my numbers in visual in Desktop and Service do not match.  I saw some posts where dates in Service are in UTC

    • lbendlin's avatar
      lbendlin
      Super User

      That's correct. Incremental Refresh uses a regular UTC calendar.

      • stribor45's avatar
        stribor45
        Post Prodigy

        so my RangeStart and RangeEnd need to be adjusted? My API endpoint takes DateTime values using my offest. how do I adjust them?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi stribor45 ,

     

    Did lbendlin  reply solve your problem? If so, please mark it as the correct solution, and point out if the problem persists.

     

    Best Regards,
    Adamk Kong

  • I almost just about finished. I was wondering how to make this RangeEnd parameter to always be the current todays date

     

     

    • lbendlin's avatar
      lbendlin
      Super User

      Why would that be necessary?  It will mess with the meta data and reset the incremental refresh

       

      Set RangeEnd to a date in the future.

      • stribor45's avatar
        stribor45
        Post Prodigy

        because I always have to hard-code today's date (see image in the previous post).