Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Show MAX value of unique customers with respective item

tushar44
6 - Meteoroid

Hi there,

 

Problem: Show the most purchased item by each customer

 

Input:

tushar44_0-1610110030593.png

 

Desired output:

tushar44_1-1610110104644.png

 

Thanks!

2 REPLIES 2
Kenda
16 - Nebula
16 - Nebula

Hi @tushar44 

 

In this case, there are two options that come to mind.

 

One option would be to use a summarize tool first. You'll want to group by customer then take the max of the % field. Finally, you'll need a join tool to get back the item field. 

 

Another option would be to first use a sort tool to sort by customer then %. Next, use a sample tool take the 1st record, grouping by customer. 

 

Hope this helps!

Emil_Kos
17 - Castor
17 - Castor

Hi @tushar44,

 

Values are different but it should work for you.

 

Emil_Kos_0-1610112358507.png

 

Good luck!

Labels