Forum Discussion
Power-Query Manually Replacing Missing Data within Queried Column
- May 25, 2025
So you want to build a history table and keep the annotations made to previously extracted data. Then I assume that what you call "Original Table" will only include URLs that haven't previously been loaded from the web. Let's call it "tOriginal".
The first time, PQ generates the "Extracted Data". Give that table a meaningful name, for instance "tAnnotated". Enter data wherever needed. You can even over-write existing data. So this would become the table in your last screenshot.
Adjust the M-code so that you create not one Source step but two steps. Let's call them "Source1" and "Source2". Add a step that appends Source1 to Source2. It would look like this.
let
Source1 = Excel.CurrentWorkbook(){[Name="tOriginal"]}[Content],
Source2 = Excel.CurrentWorkbook(){[Name="tAnnotated"]}[Content],
Append = Table.Combine({Source2, Source1})
in
Append......... where Source1, obviously, results from your MetaData function. So, replace the Bold Italic part with whatever creates your "Quelle".
Clear tOriginal and enter some new URLs and refresh the query. The new URL meta data should now be added to the bottom of the previous PQ output table.
The attached file contains a working example. Add some data in the blue table, Refresh and see what happens. Annotate some data in the green table, clear the blue table and type some new data. Refresh!!
Difficult to help without having your file. Can you create one where your Quelle step is pointing to an Excel table in the same workbook? Than I can try to work on that one explain better what to do.
Hello! its me again!
I've now worked out the problems I was having with the names of the sources and everything.
The "Appending" Part of the query works now and it attaches the new URLs and cells of the collumns at the bottom of the previously extracted data.
The problem I'm having now it that once Appended, all the newly extracted data gets replaced with NULL values.
If I click through the previous steps, the newly extracted data shows up in the all the steps it's supposed to show up in, but it doesn't in the very last step, the appended table.
A quick search told me this happens if the columns are not named the same, however since the code that created both sources is practically the same, all the names for all the columns are spelled the exact same way.
Which is why I don't understand why this is happening.
It's almost as if as soon as I execute the "Append" command, it tries to re-extract the new data, fails, and then appends the null-Data.
Maybe you have an Idea what is happening.
Thank you again for your help!