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

Repeating generated rows

MichaelKATERRA
6 - Meteoroid

Is there a way to repeat the value of an auto generated row? 

 

Both the Record ID and Generate Rows tool have the following output: 

1

2
3
4
5
6

 

I am looking for the following output: 

1
1
2
2
3
3

 

Any help would be appreciated. 

3 REPLIES 3
Claje
14 - Magnetar

Hi,

 

Assuming you can generate your rows the way you are right now, you can pretty easily modify this value afterwards with a Formula.


I used the default Generate Rows field name of "RowCount", but you can change this to your field:

CEIL([RowCount]/2)

The CEIL() function will take the nearest whole number of whatever you calculate inside of it.  By taking Rowcount/2, I get the following results:

CEIL(.5) = 1

CEIL(1) = 1

CEIL(1.5) = 2
CEIL(2) = 2

CEIL(2.5) = 3

CEIL(3) = 3

 

Hope this helps!

MichaelKATERRA
6 - Meteoroid

You are a GENIUS! This is why I love this tool, the company, and most importantly - the community. 

Thableaus
17 - Castor
17 - Castor

Fantastic idea, @Claje 

Yesterday I was figuring out some way to do it, but your solution is very clever.

Hats off to you.


Cheers, 

Labels