formula like MAX, but that grabs the top three?
I have a sheet that collects project updates per project, and I want to surface the most recent three updates per project for a report. So the data is really simple, there is a date and an incrementing autonumber, so I can use either of those for the metric.
Table has these fields, so pretty basic stuff:
ProjectName; Update Text; ID; Date
When I have done this in SQL, it is a matter of getting the MAX, for a project, then getting the MAX for a project where ID is less than the MAX, and then getting the MAX for a project where ID is less than that second-Max. That get the top three. And that's effectively a query in a query in a query.
Is there a way to pull this off in Smartsheet?
Answers
-
Hi @James Keuning
Hope you are fine, you can do that by adding the system column "Modified" which register the last date for modification then you can use the following formulas to collect the latest 3 modefication and use that with Vlookup to collect your data:
The Last of the 3 =DATE(VALUE(YEAR(MAX(Modified:Modified))), VALUE(MONTH(MAX(Modified:Modified))), (-2 + VALUE(DAY(MAX(Modified:Modified)))))
The next = DATE(VALUE(YEAR(MAX(Modified:Modified))), VALUE(MONTH(MAX(Modified:Modified))), (-1 + VALUE(DAY(MAX(Modified:Modified)))))
The first = DATE(VALUE(YEAR(MAX(Modified:Modified))), VALUE(MONTH(MAX(Modified:Modified))), (VALUE(DAY(MAX(Modified:Modified)))))
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!