Alteryx Designer Desktop Discussions

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

Creating an ID that will increment by 1 when a certain value is found

Deano478
12 - Quasar

Hi All,

 

I asked a question earlier today and the solution worked like a charm, however I have one final hurdle to jump over to complete this project i'm working on. I have a sample of my input dataset like below (anonymised for this question). 

 

Input:

 

NoTypeDateNameAccountRefDetailsDeptT/CValue
N/C:12 Name: Account 1    
31111TL31/07/2019 12DEPRECTest Transaction 11T969.17
32222YL31/07/2019 12DEPRECTest Transaction 21T955
33333TL31/07/2019 12DEPRECTest Transaction 30T9303.33
34444YL31/07/2019 12DEPRECTest Transaction 40T936.67
35555YL31/07/2019 12DEPRECTest Transaction 50T911.67
36666TL31/07/2019 12DEPRECTest Transaction 60T925.58
 YL31/07/2019 12DEPRECTest Transaction 70T912.17
N/C:41 Name: Account 2    
37777TL31/07/2019 13DEPRECTest Transaction 10T99.85
38888YL31/07/2019 13DEPRECTest Transaction 21T96.3

 

What I'm trying to achieve I know requires the use of a multi row formula however any expressions I have tried have unfortunately been to no avail What I'm trying to achieve is anytime N/C: appears an ID will increment so I'm hoping to achieve the below

 

Output:

NoTypeDateNameAccountRefDetailsDeptT/CValueIncrement_ID
N/C:12 Name: Account 1    1
31111TL31/07/2019 12DEPRECTest Transaction 11T969.171
32222YL31/07/2019 12DEPRECTest Transaction 21T9551
33333TL31/07/2019 12DEPRECTest Transaction 30T9303.331
34444YL31/07/2019 12DEPRECTest Transaction 40T936.671
35555YL31/07/2019 12DEPRECTest Transaction 50T911.671
36666TL31/07/2019 12DEPRECTest Transaction 60T925.581
 YL31/07/2019 12DEPRECTest Transaction 70T912.171
N/C:41 Name: Account 2    2
37777TL31/07/2019 13DEPRECTest Transaction 10T99.852
38888YL31/07/2019 13DEPRECTest Transaction 21T96.32

 

Cheers for any assistance with this it's been a real head scratcher for me.

2 REPLIES 2
DavidSkaife
13 - Pulsar

Hi @Deano478 

 

Try this: Create a column called Increment_ID and assign it a numerical value of 1, then use a Multi-Row tool with the following formula

IF [No] = 'N/C:' 
THEN [Row-1:Increment_ID]+1
ELSE [Row-1:Increment_ID]
ENDIF

 

 

Deano478
12 - Quasar

@DavidSkaife Massive thanks I've been scratching my head over this for a while it wasn't overly complex in the end it just took some less complex thinking on my part many thanks again

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels