Forum Discussion

Naftycs's avatar
Naftycs
Copper Contributor
Oct 20, 2021

How to refresh excel data and remove previous data automatically

I have to update a reporting template based on an excel sheet. How could I update excel sheets automatically and remove previous data? I can upend data by using Power Query refresh. I do not want that. I want only this week's data. Last week's data should be clear. 

3 Replies

  • jamecarter's avatar
    jamecarter
    Copper Contributor

    Hi,
    You can handle this easily in Power Query by filtering your date column to include only the current week, for example using:
    Date.IsInCurrentWeek([Date])
    That way, old data clears automatically on refresh. I’ve implemented a similar setup for my own reporting dashboard on my https://www.crscalculate.com and it works smoothly.

    — James Carter

  • Harun24HR's avatar
    Harun24HR
    Bronze Contributor

    You can still do that by power query. Power query can configure to auto refresh in every n minutes where n can 5, 10, 30 or any number. You can also use FILTER() function. Better, share a sample file and show your desired outcome. Attach the file or share via OneDrive, Google-Drive, Dropbox or similar service.

  • flon's avatar
    flon
    Copper Contributor

    did you ever figure it out, that's where I'm stuck

Resources