Primary code | Primary_Unique_ID | Sec_Unique_Id | Sec code |
CA | 123 | 645 | WB |
EC | 456 | 903 | KL |
EC | 456 | 903 | EC |
KM | 656 | 839 | KM |
EC | 879 | 519 | NA |
EC | 879 | 519 | EC |
EC | 879 | 519 | NA |
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_ID | Sec_Unique_Id | Sec code |
CA | 123 | 645 | WB |
EC | 456 | 903 | EC |
KM | 656 | 839 | KM |
EC | 879 | 519 | EC |
Solved! Go to Solution.
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_ID | Sec_Unique_Id | Sec code |
CA | 123 | 645 | WB |
If I am missing something please let me know.
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
@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
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.
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_ID | SecUnique_Id | Sec code |
EC | 456 | 903 | KL |
EC | 879 | 519 | NA |
EC | 879 | 519 | NA |
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?
@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
@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