Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Assistance with Iterative Macros

NoahWaite
6 - Meteoroid

Hi,

 

Essentially, I'm looking to build out a macro that will search for incongruences between the first two columns of two data sets, along with the values of "x" columns, cycling through until all of the columns have been analyzed. (Cycle 1: Columns 1+2+3-6, Cycle 2: Columns 1+2+7-10, etc.) It seems to me that an iterative macro should be able to assist with this process. Admittedly, I'm not entirely sure if this is the best way to solve this problem, so any guidance would be greatly appreciated.

 

Sample Data:

 

Set 1-

Column 1Column 2Column 3Column 4Column 5Column 6Column 7Column 8Column 9Column 10
af3a4a5a6a7a8a9a10a
bg3b4b5b6b7b8b9b10b
ch3c4c5c6c7c8c9c10c
di3d4d5d6d7d8d9d10d
ej3e4e5e6e7e8e9e10e

 

Set 2-

Column 1Column 2Column 3Column 4Column 5Column 6Column 7Column 8Column 9Column 10
af3a4a5a6a7a8a9g10a
bg3b4b5b6b7b8b9b10b
ch3c4f5c6c7c8c9c10c

d

i3d4d5d6d7d8d9d10d

e

j3e4e5e6e7e8e9e10e

 

Output -

Column 1Column 2Column 3Column 4Column 5Column 6
ch3c4c5c6c
ch3c4f5c6c

 

Column 1Column 2Column 7Column 8Column 9Column 10
af7a8a9a10a
af7a8a9g10a

 

Thanks for your help.

 

*EDIT: Additional Info*

 

Columns 1+2 will need to remain static, as within my actual data set they are key information. Apart from that, the first column of each set (e.g. Column 3 when reviewing 1+2+3-6) is the next key piece of data, with the following columns being metadata for that set. For these reasons, ideally my output will look similar to how I've written it above.

5 REPLIES 5
SPetrie
13 - Pulsar

Some of this may depend on how the data will be going forward. Will both sets always have the same number of rows? Same number of columns? Etc.

Assuming those stay the same, I dont think a macro is necessary. I was able to get basically the same result you are looking for, if not formatted the way you are wanting. It should get you on your way though and we can always tweak it as necessary.

compare.PNG

NoahWaite
6 - Meteoroid

Thanks for your response.

 

Columns 1+2 will need to remain static, as within my actual data set they are key information. Apart from that, the first column of each set (e.g. Column 3 when reviewing 1+2+3-6) is the next key piece of data, with the following columns being metadata for that set. For these reasons, ideally my output will look similar to how I've written it above.

phottovy
13 - Pulsar
13 - Pulsar

I agree with @SPetrie that you probably don't need a macro. I put together the attached workflow that is very similar before realizing the first output is columns 1-6 and second being 1,2, 7-10. Can you explain how you identify which columns to keep in your output?

SPetrie
13 - Pulsar

Assuming you only have the 10 columns and its always 4 and 4 for the comparisons, I tweaked @phottovy's workflow to generate the output I believe you are looking for. Their workflow was simpler than what I was going to kludge together 🙂

take 2.PNG

NoahWaite
6 - Meteoroid

This was exactly what I needed. Thank you! Thanks to you as well, @phottovy.

Labels
Top Solution Authors