Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Cloud Discussions

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

Can´t use a decimal step in RANGE? Is there another way?

Hello!

 

I'm trying to use the range function between two columns (TOP and BASE), but I need to use decimal steps (0.1 or 0.2), but the function only accepts integers. Is there another way to perform it?

 

I need to do this tranformation so later I can turn the result of the range function in to new rows. So, after all the wrangling (using the first row as an example) I would get a new column starting at 332.7, ending with 333 with steps of 0.1, all of them with "SQUEEZED" at the STATUS column.

 

2 REPLIES 2
Trifacta_Alumni
Alteryx Alumni (Retired)

Hey Daniel!

 

You're correct...the RANGE function only accepts integer values.

 

To accomplish your task, I would recommend multiplying both columns by 10 so that you end up with integer values that will work for the RANGE function. This will allow you to enter a step size of 1 in the RANGE function and perform the rest of your wrangling to add new records to your dataset. After you have created your new records, you can undo the multiplication by dividing the columns by 10. This will return your data to the original decimal format.

Thank you Connor! Very clever and very easy.