power query table not

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Power query table not updating when refreshed. | Excel forum

Power query table not updating when refreshed. | Excel forum

· Medium Priority · Version 365

Ahsin has attended:
Excel Advanced course

Power query table not updating when refreshed.

Hi,

I have a power query that brings in data from two tables and through a series of steps spits out a final table, which I closed and loaded .

The problem is, when I delete the previous data and load new data into these two original tables, the data in the queries do not get updated.

The data I originally built the query with was 1198 rows, the new data I pasted into the two tables after deleting the old data is only 1154 rows. The queries all still show the 1198, so it's still working with the old data (even though it doesn't exist in the two tables, table 1 and table 2).

I was wondering how to fix this.

RE: Power query table not updating when refreshed.

Hello Ashin,

Thank you for your question. It sounds like the issue you're facing is due to Power Query caching the old data. When you delete and replace data in the original tables, Power Query does not automatically refresh to pick up the new data until you explicitly refresh the query. Here’s how you could fix this issue and ensure Power Query pulls in the updated data:

Steps to Refresh Power Query Data:

Manually Refresh the Query:

After you paste new data into the tables, you need to manually refresh the query to update the results.
Go to the Data tab in Excel.
Click on Refresh All (or click on the specific query and select Refresh).
This will reload the new data from the tables into the query and update the output based on the new data set.

Check the Query Source:

Make sure your query is still pointing to the correct tables (i.e., the ones you pasted the new data into).
Open Power Query Editor by clicking Data > Queries & Connections, right-click on the query, and choose Edit.
In Power Query Editor, check the Source step to confirm it's still linked to the correct tables.

Clear the Cache:

Sometimes Power Query caches data, and a simple refresh might not fix the issue. You can force the cache to clear by:
Going to the Data tab.
Selecting Queries & Connections.
Right-clicking on your query and selecting Clear Cache.

Check for Hardcoded Data:

Ensure there’s no hardcoded data in the query steps. In Power Query, sometimes hardcoded values from previews may be retained in the transformation steps (especially if certain filters or transformations were applied). In the Power Query Editor, walk through the steps to see if any of the transformations are based on the old row count or old data.

Check for Pivot Tables or Calculations:

If the query data feeds into Pivot Tables or other calculations, make sure those are also refreshed after the data update. Pivot Tables, in particular, require manual refreshes.
Automation: Set Up Auto-Refresh

If you don’t want to refresh manually each time, you can set up Power Query to refresh automatically whenever the file is opened:
Go to Data > Queries & Connections.
Right-click on the query and choose Properties.
In the dialog box that opens, check the box for Refresh data when opening the file.
This way, every time you open the Excel file, it will pull the latest data automatically.

Troubleshooting Checklist:
Make sure you’re replacing data in the same table names.
Ensure the query connections are set to refresh automatically or refresh them manually after updating the source tables.
Verify there are no filters or steps within the query editor that are limiting the results to the old data set.
By following these steps, Power Query should hopefully update and reflect the new data.

I hope this helps.

Kind regards
Marius Barnard
STL

Edited on Thu 19 Sep 2024, 15:51

RE: Power query table not updating when refreshed.

Hi,

Thank you for the quick response.

Manually Refresh the Query - I apologise, I should have mentioned this was one of the first things I tried, it's not changing.

Check the Query Source - it is showing me table 1 and table 2 in the list, the other two there are the names of the tabs the tables are in.

Clear the Cache - I cannot see this option when right clicking.

Check for Hardcoded Data - apologise, I don't understand what you mean in this step. However, the first query from the 8 listed show 1198, so the first query isn't updating and it is the first step. There are filters, part of the transformations require a filter. Almost every query has a filter. However, all new data that comes in will always have data that those filters can apply to.

Check for Pivot Tables or Calculations - the final report as it is what all I need, this data does not get fed into any other feature.

Thank you,
Ahsin

RE: Power query table not updating when refreshed.

Hi Ashin,

I'm sorry to hear that you are still having trouble refreshing your queries.

If you're not having success with any of the the steps we suggested, it is most likely caused by some break in the connection to the original data.

As a last resort, try creating a new query from scratch and replicating the steps from your existing query.

If you are going to try this, please do save a backup copy of your workbook before making significant changes to the queries.

I hope you get it sorted soon.

Kind regards
Marius


 

Excel tip:

Select Single Data Marker

To select a single data marker in a chart, ie line, bar or column;
After you have pressed Ctrl+Click (to select the entire chart) you can press the Up or Down arrows to select a data series, then press the Left or Right arrow to select a data point within that series.

View all Excel hints and tips


Server loaded in 0.08 secs.