We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer 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
19 - Altair
19 - Altair

@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
12 - Quasar

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
19 - Altair
19 - Altair

@jerometyl 
Just a small modification should do it.

0810-jerometyl-r1.PNG

Labels