Forum Discussion

DmitryKrass's avatar
DmitryKrass
New Member
4 years ago
Solved

Wipe certain data before new load

Hello Team,

I have forecasting table in my data model (year-month, material code, qty) which we receive every month. Each time before loading next forecasting file I need clear in the existing forecasting table all months from current.

 

For example, earlier in the year we received Jan.forecast.xlsx (file_1) which contained 12 months from Jan to Dec 2022. Then we receive Feb.forecast.xlsx (file_2) which has 11 months from Feb to Dec 2022. We need to keep Jan data from the file_1, wipe out all other data in the existing table and put file_2 in it. How do I do it in the PowerQuery?  

  • Create Incremental refresh with monthly partitions. Disable automatic refresh.  Swap your data source but keep its name. Manually refresh the partitions you are interested in (via API call).

     

    Note:  This will not survive a rogue full dataset refresh. Power BI has no memory, and no concept of global variables. You may need to do all that in the upstream system instead.

1 Reply

  • Create Incremental refresh with monthly partitions. Disable automatic refresh.  Swap your data source but keep its name. Manually refresh the partitions you are interested in (via API call).

     

    Note:  This will not survive a rogue full dataset refresh. Power BI has no memory, and no concept of global variables. You may need to do all that in the upstream system instead.