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

How to add cycle number to a row

NancyS
8 - Asteroid

Hello everyone!

 

 

Have to clear a query. I want to add a cycle number to the rows. Let me clear this with an example:

 

FlagCycle No.
rdy4
st3
--2
st1
rdy5
--4
st3
st2
st1

 

One turn starts at first "st" and ends at "rdy". I want to add a cycle no. to it. that re- starts at next turn (when first "st" occurs (startof turn) "rdy" (end of turn).

 

This post is linked to the question: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/How-to-recognise-values-in-cells-based...  

 

Any suggestions?

 

TIA!

 

Nancy

3 REPLIES 3
Thableaus
17 - Castor
17 - Castor

Hi @NancyS 

 

I don't understand the sequence in your example:

 

Starting at 4:

rdy4
st3
--2
st1

 

All of a sudden, you bring a new sequence starting at 5:

rdy5
--4
st3
st2
st1

 

Could you be more specific or give a larger list of records so we could figure this logic out?

 

Cheers,

jamielaird
14 - Magnetar

Hi @NancyS 

 

I think this should do what you're looking for:

 

Screenshot 2019-05-05 at 19.13.42.png

 

This first numbers in ascending order, restarting for each Rdy row, then numbers each group, incrementing by one for each Rdy row, then calculates the max Cycle No per group in order to reverse the numbering.

NancyS
8 - Asteroid

Thanks @jamielaird , used a logic similar to yours for the implementation.Skipped the summarise tool,instead of assigning incremental numbers for "St" , assigned the very first "st" in each cycle the value of "1". 

 

Nancy

Labels