Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Create numbering for active Row-1 as -1

PB41091
8 - Asteroid

I have a data set. I have created column Flag for identifying difference days whereever is 30. Now I have to create a column where 1 row immediately before flag 1 should be -1 and flag 1 should be 0.

ABCDateDifferenceDaysFlag
apN5/31/2017[Null][Null]
aqN5/31/20201096[Null]
arY6/30/2020301
asY3/31/2022639[Null]
btN10/31/2020[Null][Null]
buY11/30/2020301

 

Sample output

ABCDateDifferenceDaysFlagOutput
apN5/31/2017[Null][Null] 
aqN5/31/20201096[Null]-1
arY6/30/20203010
asY3/31/2022639[Null] 
btN10/31/2020[Null][Null]-1
buY11/30/20203010
1 REPLY 1
flying008
15 - Aurora

Hi,@PB41091 

 

as your need ?

录制_2022_05_05_15_19_05_229.gif

Labels
Top Solution Authors