Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Comparing 2 different columns

jerometyl
7 - Meteor

Dear Alteryx Experts 

 

I need some help to compare 2 different columns data. For each row, if the 2 data is the same / if it is one after another, then I will need to check them / to have a remark to check the data. 

 

eg 

AB02982 AB02983, I will need to check 

AB02982 AB02982, i will need to check 

5 REPLIES 5
Qiu
20 - Arcturus
20 - Arcturus

@jerometyl 
We can split the data stream and deal each situation.

0810-jerometyl.PNG

jerometyl
7 - Meteor

@Qiu Hi Qiu, thank you for the quick response, but if it is blank, i would also need to go in to validate. Any idea how to change it? 

flying008
14 - Magnetar

Hi, @jerometyl 

 

Please just look that.

 

 

iif([ePRNo] = [Right_ePRNo] || ABS(ToNumber(REGEX_Replace([ePRNo], "[A-Z]", '')) - ToNumber(REGEX_Replace([Right_ePRNo], "[A-Z]", ''))) =1, "Check", "-")

 

 

录制_2022_08_10_16_01_54_140.gif

 

If you need check blank, do it with this formula:

 

iif([ePRNo] = [Right_ePRNo] || IsEmpty([ePRNo]) || IsEmpty([Right_ePRNo]) || ABS(ToNumber(REGEX_Replace([ePRNo], "[A-Z]", '')) - ToNumber(REGEX_Replace([Right_ePRNo], "[A-Z]", ''))) =1, "Check", "-")
jerometyl
7 - Meteor

Thank you everyone

Qiu
20 - Arcturus
20 - Arcturus

@jerometyl 
Just a small modification should do it.

0810-jerometyl-r1.PNG

Labels