Forum Discussion

ExcelBeginnerNerd_05's avatar
ExcelBeginnerNerd_05
Copper Contributor
May 23, 2025
Solved

Power-Query Manually Replacing Missing Data within Queried Column

Hello! I want to start off by saying I've never worked with Excel professionally before, I've only used it for very specific purposes that fit my Interest. So this might have a easy solution or plai...
  • Riny_van_Eekelen's avatar
    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!!

     

Resources