Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Alteryx Running Total ID, only change when related column changes

HenpetsGordres1
8 - Asteroid

Hello,

 

Using a Multi-Row Formula, how would I create the ID column below?

 

Capture.PNG

 

I have tried the following to no avail:

IF [Location] = [Row-1:location] THEN [ID] = [ID]
ELSE [ID]+1
ENDIF

 

Many thanks.

 

 

 

 

5 REPLIES 5
afv2688
16 - Nebula
16 - Nebula

Hello @HenpetsGordres1 ,

 

You almost got it right:

 

IF [Location] = [Row-1:location] THEN [Row-1:ID]
ELSE [Row-1:ID]+1
ENDIF

Greg_Murray
12 - Quasar

try this:

 

if location = [Row-1:Location]

then [Row-1:ID]

else [Row-1:ID] +1

endif

fmvizcaino
17 - Castor
17 - Castor

Hi @HenpetsGordres1 ,

 

Try to do as attached workflow.

Let me know if that works for you.

 

Best,

Fernando Vizcaino

 

 

neilgallen
12 - Quasar

unless you need to get more complicated with your criteria, I prefer to use the tile tool with the following settings:

 

Tile Method: Unique Value

 

Unique Column: Location (make sure "Leave Unsorted" is checked)

 

And then use the "Tile_Num" as your new ID field.

 

as like most things with alteryx, there are a number of ways to solve the problem!

HenpetsGordres1
8 - Asteroid

Thanks!

Labels