In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Compare data 2 columns

JDong
8 - Asteroid

Hi Team,

 

 

I have 2 data columns and sample as below

 

AB
216.00335.80
208.30156.90
0.00127.60
0.000.00
0.00219.00
56.2679.00
0.00228.00
0.000.00
0.00165.10
0.0072.00
0.00118.00
0.0077.00
0.000.00
0.00172.50
0.00156.00

 

 

I want to write a logic like below

 

IF !isnull([A]) THEN 'CatA'
ELSEIF !isnull([B]) THEN 'CatB'
ELSEIF !isnull([CatA]) and !isnull([CatB]) THEN 'Both'
ELSE '-'
ENDIF

 

But I do not see the right results considering the above formula. I want to if value only in "A" call in a new field CatA and if value only in "B" then CatB and if value in both columns then as "Both"

 

Thanks!

1 REPLY 1
geraldo
13 - Pulsar

@JDong 

 

IF !isnull([CatA]) and !isnull([CatB]) THEN 'Both'

elseif !isnull([A]) THEN 'CatA'
ELSEIF !isnull([B]) THEN 'CatB'
ELSE '-'
ENDIF

Labels
Top Solution Authors