Hello,
Could someone please assist with this issue. I would like to compare and display the difference between two string columns in two new columns, example:
If I had the following two columns:
Column1 | Column2 |
Day: 16 Month: November Year: 2018/2019 | Day: 16 Month: November Year: 2019/2020 |
I would like the output to be the following:
Column1 | Column2 | Difference - Column1 | Difference - Column2 |
Day: 16 Month: November Year: 2018/2019 | Day: 16 Month: November Year: 2019/2020 | 2018/2019 | 2019/2020 |
Is this possible?
Many thanks
Solved! Go to Solution.
A clarifying question for you: The cells contain embedded new lines. Are you requesting that the output include these embedded new lines too? It would seem that you could first modify the input to individual records.
The expected output also looks suspect. While both columns have "Month: November", you want the difference to be the value of year.
If you try the CReW Delta macro: https://gallery.alteryx.com/#!app/CReW-Delta--Alpha-/5b41141b826fd3116445fee8 I think that you'll get your desired results.
Cheers,
Mark
Hi Mark,
Many thanks for your response, to clarify the attached excel was dummy data to try and simplify my issue. I do need to retain the embedded lines as I am comparing variables within 2 XML documents. I have attempted to use the macro but rather than identifying the actual differences, it gave me the following:
Ideally I would have 2 columns as depicted in my desired outcome. Apologies if I have understood the Macro incorrectly. I'm also not sure what is suspect about the requested output, the difference between the columns is the value which follows "year:"
Many thanks
I have a working prototype. I sent you a private message with a link to my ZOOM account. Please come see what I've cooked up for you. This would save some back and forth possibly. At minimum it is a MVP solution. Cheers, Mark
P.S. here it is...
Hi @MarqueeCrew
Many thanks for taking the time to do this. Due to restrictions on my work issued laptop I cannot access ZOOM, apologies! I've tried via browser too but no joy unfortunately.
I posted the solution. It creates the output (final browse) and repeats the incoming data with a difference set of columns. The output includes a CSV list of differences when something is found:
,,data and ,,data.
When no difference exists, it is blank.
It allows for any number of fields to exist for comparison inside of a cell. It does require the ORDER of fields to be identical.
Cheers,
Mark
Hi @HenpetsGordres1,
So i think i've found a way for this to be done:
I've started with the below input (3 records with 3 new lines in each, one for day, one for month and one for year)
The workflow:
And the output for line 1 is just the year, nothing for line 2 (as the values are exactly the same for day, month and year), line 3 the output is the month and year.
Difference - Column1 row 3 output:
Difference - Column2 row 3 output:
If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.
Regards,
Jonathan