SOLVED

Losing data from PowerQuery Merge

%3CLINGO-SUB%20id%3D%22lingo-sub-1758183%22%20slang%3D%22en-US%22%3ELosing%20data%20from%20PowerQuery%20Merge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1758183%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20managed%20to%20combine%20the%20data%20from%20two%20of%20my%20sheets.%20My%20second%20sheet%20get%20updated%20on%20a%20daily%20basis%20and%20what%20it%20does%20is%20changing%20some%20statuses%20in%20my%20Query%20sheet.%20However%2C%20when%20a%20row%20is%20deleted%20from%20the%20second%20sheet%2C%20the%20last%20updated%20information%20is%20also%20gone.%20How%20may%20I%20prevent%20this%20from%20happening%3F%20I%20need%20it%20to%20stay%20with%20the%20latest%20information%20(or%20if%20needed%20when%20I%20manually%20add%20some%20information%2C%20which%20is%20no%20longer%20available%20in%20the%20second%20sheet%20it%20should%20not%20be%20overwrited%20and%20placed%20as%20blank%20cell).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%2C%3C%2FP%3E%3CP%3EAlex%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1758183%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1758443%22%20slang%3D%22en-US%22%3ERe%3A%20Losing%20data%20from%20PowerQuery%20Merge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1758443%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F824724%22%20target%3D%22_blank%22%3E%40SaintEnt%3C%2FA%3E%26nbsp%3BPQ%20can%20indeed%20combine%20data%20that%20exists%20in%20multiple%20tables.%20When%20you%20delete%20a%20row%20from%20one%20table%2C%20then%20it%20will%20no%20longer%20be%20include%20in%20the%20combined%20data.%20What%20else%20do%20you%20expect%3F%20Perhaps%20I%20misunderstood.%20If%20so%2C%20can%20you%20upload%20a%20sample%20of%20your%20data%20and%20the%20query%20you%20created%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1758741%22%20slang%3D%22en-US%22%3ERe%3A%20Losing%20data%20from%20PowerQuery%20Merge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1758741%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20believe%20you%20got%20the%20idea.%20It's%20to%20update%20status%20of%20an%20order%20(so%20I%20can't%20actually%20provide%20the%20sheets).%3C%2FP%3E%3CP%3ESo%20is%20there%20any%20way%20to%20be%20able%20to%20use%20power%20query%20to%20update%20the%20sheet%2C%20without%20losing%20data%20if%20the%20sheet%20I'm%20getting%20the%20newest%20information%20does%20not%20have%20the%20old%20info%3F%20Tried%20with%20different%20kind%20of%20merging%2C%20however%2C%20all%20unsuccessful.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1759100%22%20slang%3D%22en-US%22%3ERe%3A%20Losing%20data%20from%20PowerQuery%20Merge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1759100%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F824724%22%20target%3D%22_blank%22%3E%40SaintEnt%3C%2FA%3E%26nbsp%3BOkay!%20So%20you%20get%20an%20updated%20file%20every%20day%20and%20it%20happens%20that%20some%20orders%20no%20longer%20appear.%20Perhaps%20you%20need%20to%20apply%20a%20few%20extra%20steps%20to%20create%20a%20%22new%20first%22%20table.%20Tried%20to%20demonstrate%20it%20in%20the%20attached%20sheet.%20Perhaps%20a%20real%20PQ%20expert%20has%20a%20better%20idea.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1759319%22%20slang%3D%22en-US%22%3ERe%3A%20Losing%20data%20from%20PowerQuery%20Merge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1759319%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3ELooks%20like%20it%20works%20with%20Full%20outer%20join%2C%20perhaps%20the%20info%20in%20my%20data%20set%20has%20some%20difference%20in%20the%20data%20itself.%20As%20I%20tried%20it%20earlier%2C%20it%20got%20me%20some%20empty%20rows%2C%20will%20test%20it%20and%20will%20see%20if%20it%20works%20tomorrow%20morning.%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1762792%22%20slang%3D%22en-US%22%3ERe%3A%20Losing%20data%20from%20PowerQuery%20Merge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1762792%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20got%20the%20idea%2C%20managed%20to%20duplicate%20it%20on%20your%20sheet%2C%20however%2C%20the%20issue%20with%20my%20work%20on%20file%20is%20that%3C%2FP%3E%3CP%3Emy%20values%20in%20the%20beginning%20are%20nulls%2C%20after%20I%20merge%20my%20query%20with%20the%20newest%20information%20they%20receive%20some%20value%2C%20which%20is%20dependent%20on%20the%20updaters%20file(let's%20call%20it%20like%20this)%20and%20when%20the%20updaters%20file%20removes%20the%20old%20information%20-%20it%20all%20gets%20back%20to%20nulls.%20Afterwards%2C%20when%20the%20conditional%20columns%20start%20working%2C%20the%20whole%20query%20refreshes%20and%20it%20becomes%20nulls%20again.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20ideas%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1762884%22%20slang%3D%22en-US%22%3ERe%3A%20Losing%20data%20from%20PowerQuery%20Merge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1762884%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F824724%22%20target%3D%22_blank%22%3E%40SaintEnt%3C%2FA%3E%26nbsp%3BDifficult%20to%20visualise%20the%20issue%20here.%20Instinctively%2C%20I%20would%20say%20that%20you%20delete%20the%20null%20rows%20before%20merging.%20Can't%20you%20send%20a%20mock-up%20of%20the%20two%20data%20sets%20that%20need%20to%20be%20merged%2C%20indicating%20how%20the%20end%20result%20should%20look%20like.%20just%20few%20rows%20and%20columns.%20It%20doesn't%20have%20to%20contain%20any%20real%20data.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1764975%22%20slang%3D%22en-US%22%3ERe%3A%20Losing%20data%20from%20PowerQuery%20Merge%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1764975%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F824724%22%20target%3D%22_blank%22%3E%40SaintEnt%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlex%2C%20I%20see.%20Change%20the%20logic%2C%20please%20see%20in%20attached.%20Script%20is%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powerquery%22%3E%3CCODE%3Elet%0A%20%20%20%20Source%20%3D%20Table.NestedJoin(%0A%20%20%20%20%20%20%20%20OrderTable%2C%0A%20%20%20%20%20%20%20%20%7B%22OrderID%22%7D%2C%20Date1Oct%2C%0A%20%20%20%20%20%20%20%20%7B%22OrderID%22%7D%2C%20%22Date1Oct%22%2C%0A%20%20%20%20%20%20%20%20JoinKind.FullOuter%0A%20%20%20%20)%2C%0A%20%20%20%20%23%22We%20dont%20need%20initial%20data%22%20%3D%20Table.SelectColumns(%0A%20%20%20%20%20%20%20%20Source%2C%0A%20%20%20%20%20%20%20%20%7B%22OrderID%22%2C%20%22Date1Oct%22%7D%0A%20%20%20%20)%2C%0A%20%20%20%20%23%22Take%20data%20from%20Date%22%20%3D%20Table.ExpandTableColumn(%0A%20%20%20%20%20%20%20%20%23%22We%20dont%20need%20initial%20data%22%2C%0A%20%20%20%20%20%20%20%20%22Date1Oct%22%2C%0A%20%20%20%20%20%20%20%20%7B%22Status%22%2C%20%22ETA%22%2C%20%22PID%22%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22Status%22%2C%20%22ETA%22%2C%20%22PID%22%7D%0A%20%20%20%20)%2C%0A%0A%20%20%20%20%23%22Get%20Previous%20Data%22%20%3D%20Excel.CurrentWorkbook()%0A%20%20%20%20%20%20%20%20%7B%5BName%3D%22FillFromDate%22%5D%7D%5BContent%5D%2C%0A%20%20%20%20%23%22Merge%20it%20with%20current%20date%22%20%3D%20Table.NestedJoin(%0A%20%20%20%20%20%20%20%20%23%22Get%20Previous%20Data%22%2C%0A%20%20%20%20%20%20%20%20%7B%22OrderID%22%7D%2C%20Date1Oct%2C%0A%20%20%20%20%20%20%20%20%7B%22OrderID%22%7D%2C%20%22New%22%2C%0A%20%20%20%20%20%20%20%20JoinKind.LeftOuter%0A%20%20%20%20)%2C%0A%20%20%20%20%23%22Expanded%20New%20data%22%20%3D%20Table.ExpandTableColumn(%0A%20%20%20%20%20%20%20%20%23%22Merge%20it%20with%20current%20date%22%2C%0A%20%20%20%20%20%20%20%20%22New%22%2C%0A%20%20%20%20%20%20%20%20%7B%22Status%22%2C%20%22ETA%22%2C%20%22PID%22%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22New.Status%22%2C%20%22New.ETA%22%2C%20%22New.PID%22%7D%0A%20%20%20%20)%2C%0A%20%20%20%20%23%22Combine%20Status%22%20%3D%20Table.AddColumn(%0A%20%20%20%20%20%20%20%20%23%22Expanded%20New%20data%22%2C%0A%20%20%20%20%20%20%20%20%22StatusNew%22%2C%0A%20%20%20%20%20%20%20%20each%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%5BNew.Status%5D%20%26lt%3B%26gt%3B%20null%0A%20%20%20%20%20%20%20%20%20%20%20%20then%20%5BNew.Status%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20%5BStatus%5D%0A%20%20%20%20)%2C%0A%20%20%20%20%23%22Combine%20ETA%22%20%3D%20Table.AddColumn(%0A%20%20%20%20%20%20%20%20%23%22Combine%20Status%22%2C%0A%20%20%20%20%20%20%20%20%22ETAnew%22%2C%0A%20%20%20%20%20%20%20%20each%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%5BNew.ETA%5D%20%26lt%3B%26gt%3B%20null%0A%20%20%20%20%20%20%20%20%20%20%20%20then%20%5BNew.ETA%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20%5BETA%5D%0A%20%20%20%20)%2C%0A%20%20%20%20%23%22Combine%20PID%22%20%3D%20Table.AddColumn(%0A%20%20%20%20%20%20%20%20%23%22Combine%20ETA%22%2C%0A%20%20%20%20%20%20%20%20%22PIDnew%22%2C%0A%20%20%20%20%20%20%20%20each%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%5BNew.PID%5D%20%26lt%3B%26gt%3B%20null%0A%20%20%20%20%20%20%20%20%20%20%20%20then%20%5BNew.PID%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20%5BPID%5D%0A%20%20%20%20)%2C%0A%20%20%20%20%23%22Removed%20Other%20Columns%22%20%3D%20Table.SelectColumns(%0A%20%20%20%20%20%20%20%20%23%22Combine%20PID%22%2C%0A%20%20%20%20%20%20%20%20%7B%22OrderID%22%2C%20%22StatusNew%22%2C%20%22ETAnew%22%2C%20%22PIDnew%22%7D%0A%20%20%20%20)%2C%0A%20%20%20%20%23%22Renamed%20Columns%20back%22%20%3D%20Table.RenameColumns(%0A%20%20%20%20%20%20%20%20%23%22Removed%20Other%20Columns%22%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%22StatusNew%22%2C%20%22Status%22%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%22ETAnew%22%2C%20%22ETA%22%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%22PIDnew%22%2C%20%22PID%22%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20)%2C%0A%20%20%20%20%23%22Better%20to%20have%20proper%20types%22%20%3D%20Table.TransformColumnTypes(%0A%20%20%20%20%20%20%20%20%23%22Renamed%20Columns%20back%22%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%22OrderID%22%2C%20Int64.Type%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%22Status%22%2C%20type%20text%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%22ETA%22%2C%20type%20date%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%22PID%22%2C%20type%20text%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20)%0Ain%0A%20%20%20%20%23%22Better%20to%20have%20proper%20types%22%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hello,

 

I've managed to combine the data from two of my sheets. My second sheet get updated on a daily basis and what it does is changing some statuses in my Query sheet. However, when a row is deleted from the second sheet, the last updated information is also gone. How may I prevent this from happening? I need it to stay with the latest information (or if needed when I manually add some information, which is no longer available in the second sheet it should not be overwrited and placed as blank cell).

 

Thank you,

Alex

 

14 Replies
Highlighted

@SaintEnt PQ can indeed combine data that exists in multiple tables. When you delete a row from one table, then it will no longer be included in the combined data. What else do you expect? Perhaps I misunderstood. If so, can you upload a sample of your data and the query you created?

Highlighted

@Riny_van_Eekelen 

I believe you got the idea. It's to update status of an order (so I can't actually provide the sheets).

So is there any way to be able to use power query to update the sheet, without losing data if the sheet I'm getting the newest information does not have the old info? Tried with different kind of merging, however, all unsuccessful.  

Highlighted
Best Response confirmed by SaintEnt (Occasional Contributor)
Solution

@SaintEnt Okay! So you get an updated file every day and it happens that some orders no longer appear. Perhaps you need to apply a few extra steps to create a "new first" table. Tried to demonstrate it in the attached sheet. Perhaps a real PQ expert has a better idea. 

 

Highlighted

@Riny_van_Eekelen 
Looks like it works with Full outer join, perhaps the info in my data set has some difference in the data itself. As I tried it earlier, it got me some empty rows, will test it and will see if it works tomorrow morning.

Thank you!

Highlighted

@Riny_van_Eekelen 

I got the idea, managed to duplicate it on your sheet, however, the issue with my work on file is that

my values in the beginning are nulls, after I merge my query with the newest information they receive some value, which is dependent on the updaters file(let's call it like this) and when the updaters file removes the old information - it all gets back to nulls. Afterwards, when the conditional columns start working, the whole query refreshes and it becomes nulls again.

 

Any ideas?

Highlighted

@SaintEnt Difficult to visualise the issue here. Instinctively, I would say that you delete the null rows before merging. Can't you send a mock-up of the two data sets that need to be merged, indicating how the end result should look like. just few rows and columns. It doesn't have to contain any real data.

 

Highlighted

@Riny_van_Eekelen 

Hello again,

 

I've made up some information:

First, you will see the original data, with only OrderID. On table Date1Oct (marked with the light blue as well), is the information originally entered on the said date. After that I receive the new information, which is Date2Oct table (but actually just replacing the information - as my original files have the same rows/columns), and place Date2Oct on the Date1Oct, you will see how the nulls go back to the table.

And will get some examples because my explanation might be confusing ---> 

Info from Oct1

First.png

Info from Oct2

Second.png

The rows became nulls again, as there is no hardcopy of the data and I'm trying to figure a way around that.

Highlighted

@SaintEnt See attached. Unless I totally misunderstand, you must use the output of the Merged table as the input for the next day. I believe you'll understand what I mean if you look at the file.

 

So, the OrderTable = Day 1, and the DayTrans table = Day 2

The Merged table = everything from Day 2 plus all from Day 1 if Day 2 contained null.

 

Highlighted

@Riny_van_Eekelen 

Your OrderTable becomes the hardcopy from the Merge as I see, correct?

I'm trying to accomplish the same, but now I'm having some difficulties with the Macros, as my OrderTable will increase on a daily basis as well, not just the Daily information.

What I'm trying to do with Macro is to have an another sheet, which gets cleared, gets the information from the values from the latest Merge and then acts like the info gathering sheet.

 

 

Highlighted

@SaintEnt 

As variant

Very first time you generate the query which merges empty orders with current date.

With that within that query (not as separate one) you query returned table which gives previous results, merge it with current data in date table, if date table has no data for some fields keep previous data, otherwise keep previous data.

Kind of loop iterating query on itself. With that you keep only one date table updating information in it from time to time and refreshing result.

This part script is

let
    Source = Table.NestedJoin(
        OrderTable,
        {"OrderID"}, Date1Oct,
        {"OrderID"}, "Date1Oct",
        JoinKind.FullOuter
    ),
    #"We dont need initial data" = Table.SelectColumns(
        Source,
        {"OrderID", "Date1Oct"}
    ),
    #"Take data from Date" = Table.ExpandTableColumn(
        #"We dont need initial data",
        "Date1Oct",
        {"Status", "ETA", "PID"},
        {"Status", "ETA", "PID"}
    ),

    #"Get Previous Data" = Excel.CurrentWorkbook(){[Name="FillFromDate"]}[Content],
    #"Merge it with current date" = Table.NestedJoin(
        #"Get Previous Data",
        {"OrderID"}, Date1Oct, {"OrderID"},
        "Previous", JoinKind.LeftOuter
    ),
    #"Expanded Previous data" = Table.ExpandTableColumn(
        #"Merge it with current date",
        "Previous",
        {"Status", "ETA", "PID"},
        {"Previous.Status", "Previous.ETA", "Previous.PID"}
    ),
    #"Combine Status" = Table.AddColumn(
        #"Expanded Previous data",
        "StatusNew",
        each
            if [Status] = null
            then [Previous.Status]
            else [Status]
    ),
    #"Combine ETA" = Table.AddColumn(
        #"Combine Status",
        "ETAnew",
        each
            if [ETA] = null
            then [Previous.ETA]
            else [ETA]
    ),
    #"Combine PID" = Table.AddColumn(
        #"Combine ETA",
        "PIDnew",
        each
            if [PID] = null
            then [Previous.PID]
            else [PID]
    ),
    #"Removed Other Columns" = Table.SelectColumns(
        #"Combine PID",
        {"OrderID", "StatusNew", "ETAnew", "PIDnew"}
    ),
    #"Renamed Columns back" = Table.RenameColumns(
        #"Removed Other Columns",
        {
            {"StatusNew", "Status"},
            {"ETAnew", "ETA"},
            {"PIDnew", "PID"}
        }
    ),
    #"Better to have proper types" = Table.TransformColumnTypes(
        #"Renamed Columns back",
        {
            {"OrderID", Int64.Type},
            {"Status", type text},
            {"ETA", type date},
            {"PID", type text}
        }
    )
in
    #"Better to have proper types"
Highlighted

@Sergei Baklan 

Hello Sergei,

 

Thank you for the long codding that you've done, however, the query should be able to overwrite the new updates (example as you can see on Date 10/2, OrderId5 has a new Status - Finished.

As we are refreshing the query, the null values no longer appear, however, they do not update.

 

Is there anything to be done about this, as I'm quite new to the coding in excel (just from youtube videos).

 

Kind regards,

Alex

Highlighted

@SaintEnt 

Alex, I see. Change the logic, please see in attached. Script is

let
    Source = Table.NestedJoin(
        OrderTable,
        {"OrderID"}, Date1Oct,
        {"OrderID"}, "Date1Oct",
        JoinKind.FullOuter
    ),
    #"We dont need initial data" = Table.SelectColumns(
        Source,
        {"OrderID", "Date1Oct"}
    ),
    #"Take data from Date" = Table.ExpandTableColumn(
        #"We dont need initial data",
        "Date1Oct",
        {"Status", "ETA", "PID"},
        {"Status", "ETA", "PID"}
    ),

    #"Get Previous Data" = Excel.CurrentWorkbook()
        {[Name="FillFromDate"]}[Content],
    #"Merge it with current date" = Table.NestedJoin(
        #"Get Previous Data",
        {"OrderID"}, Date1Oct,
        {"OrderID"}, "New",
        JoinKind.LeftOuter
    ),
    #"Expanded New data" = Table.ExpandTableColumn(
        #"Merge it with current date",
        "New",
        {"Status", "ETA", "PID"},
        {"New.Status", "New.ETA", "New.PID"}
    ),
    #"Combine Status" = Table.AddColumn(
        #"Expanded New data",
        "StatusNew",
        each
            if [New.Status] <> null
            then [New.Status]
            else [Status]
    ),
    #"Combine ETA" = Table.AddColumn(
        #"Combine Status",
        "ETAnew",
        each
            if [New.ETA] <> null
            then [New.ETA]
            else [ETA]
    ),
    #"Combine PID" = Table.AddColumn(
        #"Combine ETA",
        "PIDnew",
        each
            if [New.PID] <> null
            then [New.PID]
            else [PID]
    ),
    #"Removed Other Columns" = Table.SelectColumns(
        #"Combine PID",
        {"OrderID", "StatusNew", "ETAnew", "PIDnew"}
    ),
    #"Renamed Columns back" = Table.RenameColumns(
        #"Removed Other Columns",
        {
            {"StatusNew", "Status"},
            {"ETAnew", "ETA"},
            {"PIDnew", "PID"}
        }
    ),
    #"Better to have proper types" = Table.TransformColumnTypes(
        #"Renamed Columns back",
        {
            {"OrderID", Int64.Type},
            {"Status", type text},
            {"ETA", type date},
            {"PID", type text}
        }
    )
in
    #"Better to have proper types"
Highlighted

@Sergei Baklan Thank you,

I did managed to do it the old school way, but still I do appreciate your efforts. 

Highlighted

@SaintEnt 

Sure, use more familiar way, with that most probably you'll save time on maintenance.

 

Thank you for the update.