Need a better Sheet Summary Formula - (Collect/Max & Index/Match)

In my example, I am able to return the top Sales for an item based on certain criteria for a Sheet Summary formula (Shirt Top Sales) with =MAX(COLLECT(Sales:Sales, Product:Product, "Shirt")). I am also able to return the Color for the Top selling Shirt (Blue) with a formula using the previous summary value in the formula: =INDEX(Color:Color, MATCH([Shirt Top Sales]#, Sales:Sales, 1)).
Is there a better formula to return the color of the top selling shirt? Suppose there are two matching values sales? That would potentially return the incorrect value.
In my example, if a Coat or Pants item had the same sales amount… the formula would return the color of that item instead of the Shirt.
Here is the incorrect Sheet Summary value based on another item with the same sales:
Best Answer
-
You would need an INDEX/COLLECT instead:
=INDEX(COLLECT(Color:Color, Sales:Sales, @cell = [Shirt Top Sales]#, Product:Product, @cell = "Shirt"), 1)
Answers
-
You would need an INDEX/COLLECT instead:
=INDEX(COLLECT(Color:Color, Sales:Sales, @cell = [Shirt Top Sales]#, Product:Product, @cell = "Shirt"), 1)
-
Of course! That makes total sense. Thanks for the answer.
-
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.5K Get Help
- 433 Global Discussions
- 152 Industry Talk
- 494 Announcements
- 5.3K Ideas & Feature Requests
- 85 Brandfolder
- 155 Just for fun
- 77 Community Job Board
- 506 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 307 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!