Forum Discussion
Old data not clearing when refreshing
Hi Graemess,
From your description, it seems like the old data is not being cleared out when you refresh your query for the new month. This is likely due to the fact that Power Query is retaining the old data in the cache. Here's a step-by-step action plan to help you clear the old data:
1. **Clear Power Query Cache:**
- Go to the `Data` tab in Excel.
- Select `Queries & Connections`.
- In the `Queries & Connections` pane, right-click on your query.
- Choose `Refresh`.
- If this doesn't work, you can try to clear the cache by going to `File` > `Options and settings` > `Data` and under `Data Cache Management Options`, click on `Clear Cache`.
2. **Adjust the Query to Remove Excess Rows:**
- Open the Power Query Editor by clicking on `Edit Queries`.
- Once in the editor, add a step to remove rows that are not needed.
- You can use the `Remove Bottom Rows` option under the `Home` tab to specify the number of rows to remove.
- Alternatively, you can add a filter to only include rows that have data relevant to the current month.
3. **Save, Close, and Load the Query:**
- After making the necessary changes, click `Close & Load` to save the query and load the data into Excel.
- Verify that the old data has been cleared and only the current month's data is present.
4. **Check for Errors:**
- If the issue persists, check for any errors in the query steps that might be causing the old data to remain.
- Look for any error messages or warnings in the Power Query Editor and address them accordingly.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.