Alteryx Designer Desktop Discussions

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

Reset value at change from another field

ianl
5 - Atom

I want to create a sequence of numbers (1,2,3,etc.) in Field 2 that resets when the last value of Field 1 changes e.g., 63031C004  changes to 63031C005. What would be the best way to do this?

 

Field 1                        Field 2

63031C004               1

63031C004               2

63031C004               3

63031C004               4

63031C004               5

63031C004               6

63031C005               1

63031C005               2

63031C005               3

63031C006               1

3 REPLIES 3
patrick_digan
17 - Castor
17 - Castor

Use a multi-row tool, group by Field1 and your formula would be something like [Row-1:NewField]+1

 

DataBlender
11 - Bolide

The tile tool could also be used. Choose unique values as the method then select field 1 as the unique field.

 

You'll get two fields outputted:

 

Tile_num will be a sequential list increasing every time field 1 changes.

Tile_sequenceNum will be a sequential list within the field 1 group:

 

Field1	Tile_Num	Tile_SequenceNum
63031C004	1	1
63031C004	1	2
63031C004	1	3
63031C004	1	4
63031C004	1	5
63031C004	1	6
63031C005	2	1
63031C005	2	2
63031C005	2	3
63031C006	3	1
ianl
5 - Atom

Thank you! that worked great.

Labels