community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Add Repeating Values

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. 

 

 

2017-08-01_18-30-33.jpg

 

Quasar
Quasar

How about the attached?

RecordID Mod.png

 

The key step is the formula tool expression:

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

 

 

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

Alteryx Certified Partner
Alteryx Certified Partner

@mbrazitis,

 

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.

 

Capture.png

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.

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

Alteryx Certified Partner
Alteryx Certified Partner

@mbrazitis,

 

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.
Quasar
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)

 

add_repeating_column.png

 

Cheers,

Bob

 

Labels