Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Identifying odds and evens values

Cfdiaz2103
8 - Asteroid

Hi everyone!

 

I would like to know if there's any function or conditional statement to identify a pair value and an unpair value.

 

Thanks for your response!

4 REPLIES 4
echuong1
Alteryx Alumni (Retired)

Are you able to provide examples of what a pair value and unpair value are? Do you have a sample dataset you can illustrate with?

Cfdiaz2103
8 - Asteroid

Hi echuong1!

 

Think about a field called "Numbers" whose inputs are numbers between 1 to 10. Then, by creating a new column, what function/tool would be appropriate to calculate whether a number is an even or odd value (Omit "pair" and "unpair" - Translation mistake) .

 

The output would be:

 

1 - Odd

2 - Even

3 - Odd
4 - Even

... 

 

I would appreciate your response.

 

Kenda
16 - Nebula
16 - Nebula

Hi @Cfdiaz2103 

 

You can use a formula tool to create a new field with the following expression:

iif(Mod([Numbers], 2)=0, "Even", "Odd")

 

This statement says if the remainder of the value in the number field divided by 2 is zero, then the number is even. Otherwise it is odd. 

 

Hope this helps! 

Cfdiaz2103
8 - Asteroid

Hi Kenda!

 

I used the formula and statement you suggested, and it worked perfectly!

 

Thank you for time 😀

 

Best Regards.

Labels