Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Generate a sequence count for each person based on number of records

neil_randall
7 - Meteor

HI,

 

I am wanting to create a sequence counter from the input data below so i know how many interations of a loop to run in a later process in order to correctly apply the change records.

 

I  create for each student an index from 1- n  and then pick the max (index) across all students . We then run through our later loop first applying all the index no(1) records then the index no(2) records etc until we hit the max (index no)

 

Can this task be performed with less components than the below? The formula simply adds a column with an integer containing the value (1) in it for every record.the summarize then sums these for each student . i.e if there are three records for a student then three 1s will appear and be totalled =3. using a component just to add a dumb counter column full of 1s seems a little inelegant!

 

 

 

----Input

 

input.JPG

 

-----output

output.JPG

Capture.JPG

2 REPLIES 2
Ned
Alteryx Alumni (Retired)

What you did obviously worked, but you could also use a multi-row formula tool.  That tool also supports grouping, so you can directly make a sequence per group with it.  The formula would simply be:

 

[Row-1:NewField]+1

neil_randall
7 - Meteor

thank you. I have looked at your solution which seems more elegant.

 

regards

 

 Neil

 

Labels