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.
SOLVED

Compare two columns with different values simultaneously

hegdepavithra10
9 - Comet

 

 

Hi,

 

I am trying to perform different operations of two columns and the result must be stored under the same column "Results".

 

I have added Record ID for this data.

 

For the first two rows i have done the following :

 

if [recordid] = 1 and [column1]=[column2] then "Match"

elseif [recordid]=2 and [column1]=[column2] then "Match"

elseif [recordid] in (1,2) then "Not Match"

else null() end if

 

I wanted to write separate formula for the other two operations and store the result in same column. But everything has gone null instead

 

 

hegdepavithra10_1-1605887843518.png

 

Could somebody suggest a solution to this?

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

There was datatype mismatch. Try this formula.

if [recordid] = 1 
and ToString([column1])=ToString([column2]) 
then "Match"

elseif [recordid]=2 and ToString([column1])=ToString([column2]) 
then "Match"

elseif [recordid] in (1,2) then "Not Match"

else null() endif

Output:

atcodedog05_0-1605889736552.png

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

hegdepavithra10
9 - Comet

Along with 1 and 2 row , i am looking for 3 and 4 th row calculation to be done as well. And the results must be in the same column.

 

3rd row to check if the value in column 1 is greater than 0.1% if yes then the comment in column "Results" must be "greater than 0.1%"

 

and 4th row must check if the difference between column 1 and 2 is greater than 2

atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

Here is a workflow for the task.

Output:

atcodedog05_0-1605891976943.png

Workflow:

atcodedog05_1-1605892010043.png

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

Labels
Top Solution Authors