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

Snake Sequencing

sheathington
6 - Meteoroid

I have an assignment of data that has been ranked 1 through however many records there are. I want to assign a snaking sequence of A/B and then B/A in order of rank, so it would look something like this:

RankA/B
1A
2B
3B
4A
5A
6B
7B
8A
9A
10B
4 REPLIES 4
CoG
13 - Pulsar

Is it guaranteed that A and B are equally distributed in the table? or are you adding the A's and B's to the data?

gawa
16 - Nebula
16 - Nebula

@sheathington 

Please find the attached WF to do that. Attached WF accepts any length of character not only A/B but also A/B/C/D....whatever.

image.png

Yoshiro_Fujimori
15 - Aurora

Hi @sheathington 

 

Does this formula work for you?

A/B = IF Mod([Rank], 4) / 4 < 0.5 THEN "A" ELSE "B" ENDIF

sheathington
6 - Meteoroid

Thank you gawa! Your solution worked perfectly. 

Labels