I am trying to assign a unique identifier to a group of rows, split up by blank spaces. Below is what I am trying to do:
Input | Desired Output |
A | ID1 |
B | ID1 |
C | ID1 |
ID1 | |
D | ID2 |
E | ID2 |
ID2 | |
F | ID3 |
ID3 |
Basically, what I was thinking was a while loop - while (current_row is not blank OR (current_row is blank AND following_row is not blank)) then keep same ID, else start using another ID. I tried using the multi-row formula tool, but was wondering if there are other intuitive ways to go about this (either using a macro or Python tool).
Thanks!
Solved! Go to Solution.
@abg5424 you're right to be thinking in terms of a Multi-Row Formula. Definitely the most intuitive way of doing this in Alteryx:
IF ISEMPTY([Row-1:Input]) THEN [Row-1:ID]+1 ELSE [Row-1:ID] ENDIF