Alteryx Designer Desktop Discussions

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

Alteryx Designer Workflow logic_Create numbering after flag is encountered in column

PB41091
7 - Meteor

Hi,

 

I have below dataset. Column C3_flag is mark which I have to use and generate 2 columns as shown in output.

I have to create numbering as per the ascending order of date for each item in C1 considering C3_flag column. I want column C4 and Column C5 as shown in expected output.

 

Available dataset: 

 

C1C2_dateC3_flag
a4/6/2019 
a9/10/2020 
a22/11/20201
a20/1/2021 
a28/2/2021 
a4/8/2021 
b18/9/2018 
b22/1/20191
b26/2/2019 
b20/6/2019 
c20/9/2017 
c20/5/2018 
c26/7/2018 
c24/9/20181
c23/11/2018 
c11/1/2019 
c18/3/2019 
d20/4/2018 
d21/7/20181
d23/4/2019 

 

Expected Output :

 

C1C2_dateC3_flagC4C5
a4/6/2019 -2 
a9/10/2020 -1 
a22/11/2020111
a20/1/2021 22
a28/2/2021 33
a4/8/2021 44
b18/9/2018 -1 
b22/1/2019111
b26/2/2019 22
b20/6/2019 33
c20/9/2017 -3 
c20/5/2018 -2 
c26/7/2018 -1 
c24/9/2018111
c23/11/2018 22
c11/1/2019 33
c18/3/2019 44
d20/4/2018 -1 
d21/7/2018111
d23/4/2019 22
3 REPLIES 3
Qiu
20 - Arcturus
20 - Arcturus

@PB41091 
This is an interesting one for me and its like reverse order.

0425-PB41091.PNG

binuacs
20 - Arcturus

@PB41091 This can be done with the help of Multi-Row tool

 

binuacs_0-1650869602211.png

 

flying008
14 - Magnetar

Hi,@PB41091 

 

please see other way to without Multi-Row Formula :

 

C1C2_dateC3_flag C1C2_dateC3_flagC4C5
a4/6/2019 a4/6/2019 -2 
a9/10/2020 a9/10/2020 -1 
a22/11/20201a22/11/2020111
a20/1/2021 a20/1/2021 22
a28/2/2021 a28/2/2021 33
a4/8/2021 a4/8/2021 44
b18/9/2018 b18/9/2018 -1 
b22/1/20191b22/1/2019111
b26/2/2019 b26/2/2019 22
b20/6/2019 b20/6/2019 33
c20/9/2017 c20/9/2017 -3 
c20/5/2018 c20/5/2018 -2 
c26/7/2018 c26/7/2018 -1 
c24/9/20181c24/9/2018111
c23/11/2018 c23/11/2018 22
c11/1/2019 c11/1/2019 33
c18/3/2019 c18/3/2019 44
d20/4/2018 d20/4/2018 -1 
d21/7/20181d21/7/2018111
d23/4/2019 d23/4/2019 22

 

录制_2022_04_25_15_16_32_171.gif

Labels