Alteryx Designer Cloud Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Cloud.
解決済み

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

404c8e6ac806a3c05f90
メテオール

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件の返信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.

404c8e6ac806a3c05f90
メテオール

Thank you Connor! Very clever and very easy.