We are aware of an issue with the Search bar. Please use Advanced search for the time being while we troubleshoot. Thanks for your patience as we work on improving the community!

Alteryx Designer Discussions

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

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

7 - Meteor

Hi everyone!

I currently have a table that looks like this:

PlantItemInventory Value

Plant A

Item X

Plant AItem Y12
Plant AItem Z11

Plant B

Item X

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!

17 - Castor
17 - Castor

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.


17 - Castor
17 - Castor



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.



17 - Castor
17 - Castor



Both of ways to do this in the WF attached.



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.