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
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!