MAX Date based on value in a Category column
Hello. I am trying to calculate MIN and MAX dates based on the value in the Milestone Category. The first screenshot is my source sheet. The second screenshot is the second sheet where I am performing the calculations.
Looking at the first screenshot below, let's say I want to calculate the MAX Start Date for any row that contains "Array Assemblies", I would expect a returned value of 3/23/23.
If I use the following formula, it is only looking at row #49 and returning an incorrect value of 3/10/23:
=MAX(COLLECT({Start Date}, {Milestone Category}, "Array Assemblies"))
If I use the following formula, it returns a blank value for some reason:
=MAX(COLLECT({Start Date}, {Milestone Category}, CONTAINS("Array Assemblies", {Milestone Category})))
Can someone please give me some advice on how to best do this?
Best Answer
-
You need an "@cell" reference in the CONTAINS function for the "range".
=MAX(COLLECT({Start Date}, {Milestone Category}, CONTAINS("Array Assemblies", @cell)))
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Answers
-
You need an "@cell" reference in the CONTAINS function for the "range".
=MAX(COLLECT({Start Date}, {Milestone Category}, CONTAINS("Array Assemblies", @cell)))
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
You're the man! Thanks, @Paul Newcome!
-
Happy to help. 👍️
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!