Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Macro Help

maverick_70
7 - Meteor

Hello,

 

Need help with below. The data can have multiple levels so would require a Macro.

ColumnAColumnB
ABCa1234
ABCb4321
a1234c4545
a1234d6565
b4321z1234
b4321f8686
c4545u8989

 

What I need is 

ABCa1234,b4321,c4545,d6565,z1234,f8686,u8989
a1234c4545,d6565,u8989
b4321z1234,f8686

 

Trying to figure how to make it in Alteryx, so far no luck. 

Would appreciate the help.

4 REPLIES 4
DannyS
Alteryx Alumni (Retired)

Hi @maverick_70 ,

 

It appears that you are trying to aggregate that dataset, but what is not apparent is the pattern the pattern in which you need to group the data by. My initial thought would be to use a summarize tool to group your data by column A and the use the "concatenate" option for Column B with a comma separator:

 

DannyS_0-1594243894299.png

 

That gets you in a slightly better state (and in turn could easily be created as a macro) but not the exact outcome you were looking for. Can you explain the outcome a bit more?

maverick_70
7 - Meteor

Say ABC is the top most level. Anything that goes into it will be part of it hence the concatenation. 

and anything that goes into a1234 will be part of it.

maverick_70_0-1594245093994.png

Hope this clarifies it.

 

forgot about c4545. the result for it will look like c4545=u8989

T_Willins
14 - Magnetar
14 - Magnetar

 @maverick_70,

 

The attached workflow should work for what you are looking for.  This is a variant of an iterative macro I use to create trial balance validations.

 

Iterative MacroIterative Macro

 

WorkflowWorkflow

 

maverick_70
7 - Meteor

This is great. Works exactly as I needed. Thank you

Labels
Top Solution Authors