Alteryx Designer Desktop Discussions

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

Group data by one column then sort another column with an ascending loop

JordanJ
7 - Meteor

Hi all,

 

Is there a way to group data by one column's values, and then have another one (or two) columns sort in ascending order then start the sort over when a certain value is reached in the second column?

 

For example, I want to have issue age grouped by age, and then I want to have duration and issue age sorted in ascending order. Once attained age reaches its highest value (120) I want the loop to start over.

 

Issue AgeDurationAttained Age

59

159
59260
59361
59462
59563
...
...
...
5962120
60060
60161
60262

 

I've tried a few things with summarize tools, multi-row formulas, sorting tools, etc. and haven't been able to figure it out.

 

Thanks!

3 REPLIES 3
geraldo
13 - Pulsar

HI,

 

 

Have you tried 3 group by to verify the result?

 

[]

DiganP
Alteryx Alumni (Retired)

@JordanJ  Attached is the workflow. I just sorted by issue age, duration and attained age then use the unique tool to get rid of duplicates ending with the multi-row formula tool to get the counter. Is this what you are looking for?

Digan
Alteryx
JordanJ
7 - Meteor

Thanks @DiganP, that worked perfectly!

Labels