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.
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.5K Get Help
- 448 Global Discussions
- 145 Industry Talk
- 481 Announcements
- 5.1K Ideas & Feature Requests
- 85 Brandfolder
- 152 Just for fun
- 73 Community Job Board
- 492 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 304 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!