Start Free Trial

Alteryx Designer Desktop Discussions

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

Create numbering (sequence) positive and negative from benchmark given

PB41091
8 - Asteroid

I have below data set. I have created a flag as 0 and -1. Now 

i have to generate sequence as shown in output column where if you group by columnA, then group by column B and Column C is 'Y' and flag is 0 then next row should be 1, and so on. Similarly if flag is -1 then row wise I have to create negative sequence.

 

ABCDateFlags
aqN4/30/2020Null
aqN5/31/2020-1
apY6/30/20200
apY3/31/2022Null
btN7/31/2020Null
btN8/31/2020Null
btN9/30/2020Null
btN10/31/2020-1
bsY11/30/20200
bsY12/31/2020Null
bsY1/31/2021Null

 

Output:

ABCDateFlagsOutput
aqN4/30/2020Null-2
aqN5/31/2020-1-1
apY6/30/202000
apY3/31/2022Null1
btN7/31/2020Null-4
btN8/31/2020Null-3
btN9/30/2020Null-2
btN10/31/2020-1-1
bsY11/30/202000
bsY12/31/2020Null1
bsY1/31/2021Null2
4 REPLIES 4
IraWatt
17 - Castor
17 - Castor

Hey @PB41091,

Could you explain the logic behind how this sequence works?

Thanks,

Ira

flying008
15 - Aurora

Hi,@PB41091 

 

I made a similar post a few days ago with a solution. ( the flow is group by column A, so you can group column B or C as your need. )

 

录制_2022_05_05_17_07_58_953.gif

PB41091
8 - Asteroid

will you share your workflow?

binuacs
21 - Polaris

@PB41091 Another way of dong this

 

binuacs_0-1651743791460.png

 

Labels
Top Solution Authors