Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Deduping across Multiple Columns to Single Output Column

barnese
7 - Meteor

Hi Alteryx Experts,

 

I have a use case where I have been collecting user logins over the past few months.  I need to be able to select certain columns of data and provide a single list of users for that date range.

 

So for example my data looks like the below:

day 1day 2day 3day 4day 5
johnsallyjohnjohnfred
sallygeorgepetersallytom
miketomsallypeterjohn
petermikefredtomted

 

and I want to see who logged in for day 3-5, so my desired output is:

Users:
john
peter
sally
fred
tom
ted

 

I'm trying to do it in a way that I would be able to add and select different columns as time goes by to keep an up to date "active" user list for my application.  I actually also have multiple sources for the login logs so would want to be able to combine and dedupe the lists once each log has a single list.

 

So far all I have been able to achieve is sorting the columns I want to use, but am at a loss on how to get the dedupe logic working across multiple columns and outputting to a single column. I've tried transposing, unique tool, join multiple tool, etc but I am stumped! 

 

Please help!

3 REPLIES 3
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @barnese,

 

You could start by transposing and doing a little bit of preparing:

 

Jonathan-Sherman_0-1593533519794.png

 

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

Zas3NfkB
7 - Meteor

Hi @barnese you can do it fairly easily by pivoting the data then using a filter tool. For this case a simple OR function was used but depending on the size of the data, you could make it more dynamic. 

 

Zas3NfkB_0-1593533766162.png

 

barnese
7 - Meteor

Thank you!  Both of these suggestions are working to get the unique list.  I can provide a filter based on timestamp so it is very helpful!  

Labels