Alteryx Designer Desktop Discussions

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

Create record based on unique ID

Ronal_bal
8 - Asteroid

Need to create record id based on the unique groups. Attached example screenshot.

 

For Group-A record id is from 1-9

 

likewise whenever there is an unique group need to count the rows from 1.

 

 

 

RECORD ID.png

 

 

 

 

 

 

 

6 REPLIES 6
Prometheus
12 - Quasar

@Ronal_bal What is the question?

Ronal_bal
8 - Asteroid

editted the question.Please check

Prometheus
12 - Quasar

@Ronal_bal First thing I did was create a new field with a Formula tool and called ir RecordID. It's a numeric data type hard coded as 1. Then I used a Running Total tool and grouped by Group and did the running total on RecordID. After that, I used a Select tool to rename RunTot_RecordID as RecordID and deselect the original RecordID, then I sorted the data by Group and RecordID ascending.

RID 1.PNG

Running Tot.PNG

Rename RID.PNG

RID by Group.PNG

Treyson
13 - Pulsar
13 - Pulsar

check out the multirow tool. It allows you to create a value based on records above/below the current record and more importantly, group on a field.

 

So in this example, you would create a new numeric field called something like "ID" and the value in each field would be the value in the record above plus 1 (Something like [Row-1:ID]+1 and select your "Group By" field as "Group". Essentially what that means is it also checks the value on that Group field and if the record above has a different group value, it starts over.

 

The first record would be 1, then 2, then 3 all the way until record 12 where it starts back over at 1.

Treyson Marks
Senior Analytics Engineer
steven-barsalou-nninc
6 - Meteoroid

Use a multi-row tool to generate the ID.

 

workflow.png

multi-row config.png

 

 

Treyson
13 - Pulsar
13 - Pulsar

Dang it. I'LL GET YOU NEXT TIME TITO!!!!

Treyson Marks
Senior Analytics Engineer
Labels