Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Add Repeating Values

mbrazitis
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. 

 

 

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

 

7 REPLIES 7
Joe_Mako
12 - Quasar

How about the attached?

RecordID Mod.png

 

The key step is the formula tool expression:

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

 

 

mbrazitis
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

MarqueeCrew
20 - Arcturus
20 - Arcturus

@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 restart. Order shall return.
Please Subscribe to my youTube channel.
mbrazitis
5 - Atom

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

MarqueeCrew
20 - Arcturus
20 - Arcturus

@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 restart. Order shall return.
Please Subscribe to my youTube channel.
Joe_Mako
12 - Quasar

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

Bob_Blackey
11 - Bolide

 

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