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!!
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!!
- ExcelBeginnerNerd_05May 25, 2025Copper Contributor
Thank you for your help!
In theory, this is exactly what I wanted. However, in practice, I am struggling to apply it to my workbook.
Which M-code am I supposed to be adjusting? The one of "tAnnotated", the one of my original Query, or am I supposed to create a new query from the table, like with the self-referencing query?