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

Condition Not a whole Number

mjtowne
8 - Asteroid

Hi,

 

Field A and Field B both contain values that are whole numbers and decimal. I am trying to write a formula that will first look at coumn A and see if the number is a whole number and if not go to coumn B a new column created with the output and round the value if both numbers are decimal to the nearest .5

 

Column A         Column B

1                            1.2

1.7                          1

50.9                      51

23.2                     23.5

 

Thanks

 

Martin

2 REPLIES 2
AndrewW
11 - Bolide

You could try using a formula tool and enter this expression:

 

round(iif(IsInteger([ColA]),[ColA],[ColB]),0.5)

mjtowne
8 - Asteroid

Yes that might actually work thank you.

Labels