We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to create count sequence

Mostafa_Anwar
8 - Asteroid

Hi All,

 

How i can create a workflow to add count sequence for all customers in the Customer ID column based on each Event ID for all customers attend each event, So as per the highlighted cells in the attached output excel sheet for each EventID the customers id column will start the sequence from beginning.

 

Attached is the sample of data-set along with the output that looking for.

 

Thanks in advance!

 

Regards,

Mostafa

 

6 REPLIES 6
MarqueeCrew
20 - Arcturus
20 - Arcturus

@Mostafa_Anwar ,

 

 you can use my group by record id macro tool:

 

https://gallery.alteryx.com/#!app/CReW-GroupByRecordID/5e417bbf0462d70decb763a9  

 

cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Mostafa_Anwar
8 - Asteroid

Thanks @MarqueeCrew  for your respond, The provided WF creates number sequence for all rows, But what i am looking for that how the sequence start from 1 again in case of the number of EventID change, Please check the highlighted square you will notice the event id changed but the sequence count didn't start from the beginning.

 

1.jpg

markcurry
12 - Quasar

Hi @Mostafa_Anwar , the Crew macro should do the trick for you, you just need tick Event ID in the Grouping Fields. 

 

Then add the new RecordID to the Customer ID field with the formula ..[Customer ID] + "_" + ToString([RecordID])

 

GroupBy RecordID.png

 

 

RobertOdera
13 - Pulsar

Hi, @Mostafa_Anwar 

 

Try this.

Please mark as a solution + like, if it works for you.

RNO2_0-1591552215101.png

The workflow is attached.

Cheers!

RobertOdera
13 - Pulsar

Thanks @Mostafa_Anwar 

Glad to be of help.

Cheers!

ll98
9 - Comet

Love the script -- What about if the fields are the same -- how do you do the avoid counting doubles .. In other words, if we 5 rows and two of the rows are the same value -- how do you avoid counting just 1 2 3 4 5 

instead of 1 2 3 4..  Basically if the field is related to James only and James is listed multiple times -- I just want  to count him as once.

Labels
Top Solution Authors