Datasets compare and keep/replace

Dear eDNA forum,

I would like your help to solve the following task:

  • I have a report which I weekly update with some new data and am struggling to find a logic to combine old and new information and keep or replace some of them based on the value of some fields

On the left (green) the combined report and on the right (blue) is what I would like to achieve:
image

Basically:

  • For Deals which were already in the previous report and repeat in the second one, I would like to keep the Type = /PAST/ but get the new Revenue value (first 2 rows of Blue table), while the others I would just carry the values they have as they do not repeat

The working file is called EDNA_FORUM_COMPARE, please populate the parameter FOLDER_PATH with the ‘DATA’ folder path in your computer to have the file working

image

WK12.xlsx (20.1 KB)
WK11.xlsx (20.0 KB)
EDNA_FORUM_COMPARE.xlsx (21.5 KB)

Attached the working file

Thanks a lot for any suggestion

Ciao Antonio,
-build a custom column with if [Type] = "\Past" then null else "\Past"
-merge the table with itself, Type & ID with Custom & ID
-expand and you will only have two matches
-replace Total Rev with Custom if Custom is not null
-remove duplicates on Deal ID
=> Done!

Regards,
Matthias

Hello @Anferrig

Did the responses above help solve your query?

If not, can you let us know where you’re stuck and what additional assistance you need?

If it did, please mark the answer as the SOLUTION by clicking the three dots beside Reply and then tick the check box beside SOLUTION

Thank you

Hi @Anferrig

Due to inactivity, a response on this post has been tagged as “Solution”.

If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box.

Ciao @Matthias,

thanks a lot for your reply

the notification ended up in spam so am seeing it only now

I will try the solution and let you know how it goes

Very sorry for the delay

Wish you a nice day

Antonio