Detecting same id pairs when their order in reverse

2 followers
0
Avatar

Hi,

In a column, I have id pairs. Some of the pairs in the different rows are in reverse order, such as; "abc123 - xyz456" and "xyz456 - abc123". I need the column to be unique by detecting these kind of pairs are the same. How could i do that?

Thansk,

Tuğrul 

 

 

Tugrul Bayrak

3 comments

  • Avatar
    Konsta Danyliuk

    Hello Tuğrul.
    Just to confirm if I properly understand your intention. Please let me know if I missed something.

    • You have a column with string values - id pairs.
    • Some values might look like reversed pairs, e.g. "123 - abc" and "abc - 123".
    • You would like to find number of unique values at this column and you want "123 - abc" and "abc -123" to be considered as the same value.

    In case my understanding is correct, please let me know whether all these id pairs are separated by a dash ("-") character?

    If you like, I could transform this post into a zendesk ticket. Perhaps it would be even more convenient.

    0
  • Avatar
    Tugrul Bayrak

    Hi Konsta,

    As you stated, some pairs are in reverse order. I need to deduplicate these kind of pairs. If I have "123 - abc" and "abc - 123" values in different rows, I would like to have one of them, either of them. 

    To achieve this, it would be great to be able create another column with the same and unique values for pairs, then I might group them like below;

    "123 - abc", 1 
    "abc - 123", 1
    "333 - xxx", 2
    "444 - yyy", 3
    "555 - zzz", 4

     

    And yes, they are separated by a dash character. If it is ok for you, you can transform this into a ticket.


    Thanks 


    Tuğrul

     

    0
  • Avatar
    Konsta Danyliuk

    Hello Tuğrul.

    Thank you for additional details. I've created support ticket 16085 of your behalf and will be handling this request via this incident.

    0
Please sign in to leave a comment.