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

Repeating generated rows

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. 

Magnetar
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!

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

Alteryx Certified Partner

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