Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Rows under same ID, how to remove specific row by checking other value in same column

neoiris
6 - Meteoroid

Hi 

I'm beginner in Alteryx and would like to seek expert's help. 

 

In following table, if ID has Category = 'Passport', check if the same ID has any of following category ' Work permit' or 'Employment Visa' or 'Permanent Resident' or Null.

If yes, then the Passport row needs to be removed.  

Can you please help how to set this up in Alteryx?

 

Input

IDCategoryGenderSalary
61053Work permitM5000
61053Employment VisaM5000
61053Permanent ResidentM5000
61053PassportM5000
3443PassportF3000
3443 F3000
2222 M1500

 

Output

IDCategoryGenderSalary
61053Work permitM5000
61053Employment VisaM5000
61053Permanent ResidentM5000
3443 F3000
2222 M1500
6 REPLIES 6
geraldo
13 - Pulsar

@neoiris 

 

an example of how to do

 

sameid.JPG

neoiris
6 - Meteoroid

Hi

Thank you for your great help.   The original data has many other columns and I added just two which are  Gender and Salary for example.

Is there anyway to keep these columns after the processing is done?  

flying008
14 - Magnetar

Hi, @neoiris 

 

FYI.

 

IIF([Category] = 'Passport' && REGEX_Match([Concat_Category], '^.*?(Work permit|Employment Visa|Permanent Resident|\s).*$'), 'x', [Category])

 

 

录制_2024_03_07_13_46_43_571.gif

neoiris
6 - Meteoroid

HI @flying008

Thank you for your help. It works! 

flying008
14 - Magnetar

Hi, @neoiris 

 

If can help you get your want, please mark it as a solution and give a like for more share.

Manoj_k
9 - Comet

HI, @neoiris i found a way to do this without the need of regex,

Labels