Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

Find and Highlight the Maximum value per each category of a field

Highlighted
Alteryx Partner

Hi everyone!

I currently have a table that looks like this:

PlantItemInventory Value

Plant A

Item X

10
Plant AItem Y12
Plant AItem Z11

Plant B

Item X

5
Plant BItem Y3
Plant CItem X4
Plant CItem Y5
Plant CItem Z7


What I would like to do is to create a tool to automatically highlight, or make somehow understand, which is the item with the maximum inventory value for each plant.

Do you know a way to do it?

Thanks a lot!

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @PNiccolo 

Group by Plant and use Max on the Inventory Value, with the Summarize Tool.

 

You can them join it back to your dataset by Plant and Inventory Value to get the Item, if you want.


Cheers,

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@PNiccolo 

 

Another way of doing it would be using the Sort Tool + Sample Tool.

 

The Sort Tool would sort your Plant and Inventory values by Descending, then you could use the Sample Tool to get the 1st value grouping by Plant.

 

Cheers,  

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@PNiccolo 

 

Both of ways to do this in the WF attached.

 

Max_Value.PNG

Highlighted
8 - Asteroid

Tested both approaches, works wonderfully.

 

Just a caution for the Sort Tool + Sample Tool approach:

When there is more than 1 maximum types (e.g. both apples are oranges are maximum for a fruit shop), only one will be reflected.

 

As such, I will prefer the Summarize and Join approach earlier by @Thableaus.

Labels