In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Add ID based on previous Column

kauser
8 - Asteroid

hello, 

how can i add ID column based on previous column 

 

input data - 

 

Date
Settle Date 8/2/2024
Settle Date 8/2/2024
Settle Date 8/2/2024
Settle Date 8/3/2024
Settle Date 8/3/2024
Settle Date 8/6/2024
Settle Date 8/6/2024
Settle Date 8/6/2024
Settle Date 8/7/2024

 

Expected output - 

 

DateID
Settle Date 8/2/20241
Settle Date 8/2/20241
Settle Date 8/2/20241
Settle Date 8/3/20242
Settle Date 8/3/20242
Settle Date 8/6/20243
Settle Date 8/6/20243
Settle Date 8/6/20243
Settle Date 8/7/20244

 

 

2 REPLIES 2
Pilsner
13 - Pulsar

Hello @kauser 

There are several ways you could tackel this.

I would suggest either a multirow or a tile tool configured as per the images below. If you use the tile tool method. You may also need to use a select tool to rename the relevant column.

Screenshot 2025-02-12 175558.png

Screenshot 2025-02-12 175846.png

I have also attached the corresponding workflow.

Please let me know if you if this helps.

Regards - Pilsner

Luke_C
17 - Castor
17 - Castor

Hi @kauser 

 

Multi-row formula tool would work:

if [Date] = [Row-1:Date] then [Row-1:ID] else [Row-1:ID]+1 endif

 

image.png

Labels
Top Solution Authors