# Alteryx Designer

SOLVED

Highlighted
5 - Atom

I am brand new to Altreryx, so please forgive me if i am in the wrong place. I am trying to add a repeating column of data into a column. How would i align a column (A,B,C,D and make it repeat?) the First column would be unique values.

Highlighted
12 - Quasar

The key step is the formula tool expression:

MODULO([RecordID]-1, [Count])+1

Highlighted
5 - Atom

Hi Joe,

thanks for the response! I am having trouble with the formula. I am putting Mod as the new column and then typing in the MODULO formula and am getting an error that says unknown function "MODULO".

Best,

Mike

Highlighted
Alteryx Certified Partner

I like the approach that @Joe_Mako took in his solution.  I liked it so much that I wanted to come up with an entirely different way of approaching the problem.  Please see my "Invention" as an alternative way to get there.  I first figure out how many times to repeat column B and then create a long column B to be at least as long as column A.  Then I join the rows together and get to my solution.

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
5 - Atom

Thanks for the help!! This is great. I was thinking it would be a simple solution, little did i know..

Highlighted
Alteryx Certified Partner

The approach that I took was intentional.  @Joe_Mako brought you there quickly.  His formula needs to be revised to:

MOD([RecordID]-1, [Count])+1

Modulo is the "name" of the function, but in Alteryx, it is just MOD([x],[y]).

Please do also mark his response as a solution.

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
12 - Quasar

Thanks @MarqueeCrew ! I used one of @jdunkerley79 's functions, attached is the workflow edited to use the built-in function.

Highlighted
Alteryx Partner

Well, I started to try and out Goldberg @MarqueeCrew, but after banging together the BLOB CONVERT, SUPPORT VECTOR MACHINE and JSON BUILD tools I thought the better of it and grabbed a beer and sat down.

I did have an idea though so I'm adding this to reinforce the fact that there's always more than one way to do things in Alteryx.  :-)     (and I just used the SUMMARIZE concatenate recently)

Cheers,

Bob

Labels