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

Numbering at every change

Steven_Garcia
6 - Meteoroid

I am new to Alteryx so this is very difficult for me. But is there a way where a column can be numbered at every change it sees in another column? But with the numbering being twice.

 

So for example going down on Field3, it will need to be 1,1,2,2 and every time it sees a change in Field2 it will restart. The column CorrectWay is how the output should look like.

6 REPLIES 6
binuacs
21 - Polaris

@Steven_Garcia One way of doing this with the help of the Multi-Row formula

 

binuacs_0-1651465440030.png

 

Steven_Garcia
6 - Meteoroid

Thank you for that! But how do I make this functional if let's say my first column changes naming. So there could be instances where I do not have the word Level or Amount.

Luke_C
17 - Castor
17 - Castor

Hi @Steven_Garcia 

 

That should be achievable, can you provide a representative sample data set? 

Steven_Garcia
6 - Meteoroid

Yes. Here is an example data set. Thank you!

Luke_C
17 - Castor
17 - Castor

Hi @Steven_Garcia 

 

Assuming there will always be two rows to get grouped together, this should work:

 

  1. Use tile tool to add a sequence ID for each Field2 value
  2. Divide the sequence ID by 2, then round up

 

Luke_C_0-1651500970312.png

 

 

Steven_Garcia
6 - Meteoroid

Wow that is genius! I would have never thought to divide! Thank you so much.

Labels