community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

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

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

Highlighted
Founder
Founder

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

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

 

regards

 

 Neil

 

Labels