Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Let Alteryx treat "A + B" = "B + A"

jensroy
9 - Comet

So now I am going to give personalization a go and I ended up with a pickle. So, I have a small Alteryx question on “filter”. Do you have a cleaver way to deal with this:

 

Hi! I am working on a data set for personalization. In my case "a customer who read this article A also read Article B".

 

This could be the input

 

input.png

 

Then i do a self join on customer, and remove the rows where both values are the same:

output.png 

 

Then introducing my challenge. In my case, A + B is the same as B + A

These are in Princip the same. Much like 1+2 = 3 and 2+1 = 3.

 

Is there a good way to tell alteryx  that “1+2” and “2+1” actually is the same. I wish to only keep one of the values.

 

What I tried to do was to convert these strings into numeric values using this:

HexToNumber(MD5_ASCII([Field 1]))

 

Because then I could say Give me the first record of :HexToNumber(MD5_ASCII([Field 1]))+HexToNumber(MD5_ASCII([Field 2]))

Hex to numbers is a very long numeric value so it might not be likely to cause a problem but theoretically “1,5 + 1,5” is also 3, just like 1+2 or 2+1.

 

Any smart way to fix this?

 

Sample workflow is attached.

 

 

2 REPLIES 2
patrick_digan
17 - Castor
17 - Castor

@jensroy I would add a recordID at the beginning and then after your join only keep the records where RecordID < Right_RecordID. That way it will only take the first of the matches

Capture.PNG

jensroy
9 - Comet

Thanks, that worked great! It reduced the rows from 2,3 million down to 800k. Removing other unwanted rows and now I'm down to 400k. Not a bad days work! Thanks mate

Labels