Alteryx Designer Desktop Discussions

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

How to eliminate which does not have matching code and coming multiple times in a row

Sshasnk
8 - Asteroid
Primary code Primary_Unique_IDSec_Unique_IdSec code
CA123645WB
EC456903KL
EC456903EC
KM656839KM
EC879519NA
EC879519EC
EC879519NA

 

I have to eliminate the above record: on 2 conditions

 

1. If it is coming multiple times

2. Primary code = sec code

 

Expected Output:

 

Primary code Primary_Unique_IDSec_Unique_IdSec code
CA123645WB
EC456903EC
KM656839KM
EC879519EC
16 REPLIES 16
Emil_Kos
17 - Castor
17 - Castor

Hi @Sshasnk,

 

I have prepared what you required but I think your output have a small mistake.

This line not meet your required criteria:

 

Primary code Primary_Unique_IDSec_Unique_IdSec code
CA123645WB

 

If I am missing something please let me know. 

Emil_Kos_0-1602062487987.png

 

AngelosPachis
16 - Nebula

Hey @Emil_Kos and @Sshasnk  ,

 

I would suggest a similar workflow to @Emil_Kos , but note that for some reason Record No.3 shouldn't be there as Primary Code=Sec Code (KM=KM)

 

Screenshot 2020-10-07 102559.jpg

AngelosPachis
16 - Nebula

I think there was a confusion with the requirements and which fields should be eliminated, so in @Emil_Kos workflow whatever is coming out of the False anchor of the Filter tool is the desired output

Sshasnk
8 - Asteroid

@Emil_Kos and @AngelosPachis the record should be there because it coming once and if read my condition I only have to check primary code = sec code if it is coming multiple times

Sshasnk
8 - Asteroid

@Emil_Kos  from @Emil_Kos result if I choose false it is not giving me this record

 

KM656839KM

 

which should be there because it is coming once so no need to check primary code = sec code

AngelosPachis
16 - Nebula

In the Unique tool, uncheck Primary Code and Sec Code and only check the Primary-Secondary Unique ID fields. That will return you the outcome you are looking for out of the Unique anchor (U) without having to use a filter.

 

Screenshot 2020-10-07 105020.jpg

 

What is unclear to me is what you want to do with the records that come multiple times and fall out of the Duplicate anchor of the unique tool, which are the following:

 

Primary code PrimaryUnique_IDSecUnique_IdSec code
EC456903KL
EC879519NA
EC879519NA

 

If the Primary Code=Sec Code (in the above example it doesn't), then do you want to include them in your output or not?

Sshasnk
8 - Asteroid

@AngelosPachis Yes I want to exclude those which are coming multiple times but the primary code is not sec code. Everything else should be there, I mean including the once which is once 

 

we don't have to check for the record which is only coming once

Sshasnk
8 - Asteroid

@AngelosPachis  Your solution won't work because if structure of the row change then it might pick any other row, because unique tool will always pick the first 

 

@Emil_Kos  changed the Input a bit

Emil_Kos
17 - Castor
17 - Castor

Hi @Sshasnk,

 

Can you show your solution?

I am curious what changes you have applied. 

Labels