Return most recent date of co-located sites
I am running a yearly list of sites that are being inspected and need to return the most recent inspection date for those sites that are co-located (same address, different site IDs)
I have tried using the index countifs and get Incorrect data types even though all the date columns and the co-located visit helper column are set to date type.
Answers
-
Hi @Kevin7859
Have you tried using MAX(COLLECT())?
It will look something like:
=MAX(COLLECT([23-24SY Date Visit]:[23-24SY Date Visit], Co-Located@row, 1, [Co-Located With]@row, [Site ID]@row))Explanation:
COLLECT([23-24SY Date Visit]:[23-24SY Date Visit], Co-Located@row, 1, [Co-Located With]@row, Site ID@row)
:[23-24SY Date Visit]:[23-24SY Date Visit]
: This specifies the range from which you're collecting the data (dates).Co-Located@row, 1
: Filters the data for rows where the Co-Located value equals 1.[Co-Located With]@row, Site ID@row
: Adds another filter where the Co-Located With value matches the Site ID.
MAX(...)
:- The
MAX
function will return the latest date from the results of theCOLLECT
function.
- The
This formula retrieves the maximum (latest) date from the [23-24SY Date Visit] column where both the Co-Located and Co-Located With conditions are met.
Hope this helps
Marcé Holzhauzen
Solution and Delivery Consultant with Award Winning Partner
Want to meet?Check my availabilitywww.prodactive.co.uk
If this helped, help me & the SSC by accepting it and reacting w/💡insightful, ⬆️ Vote Up, and/or ❤️Awesome. -
I have tried the formula but it is returning an error of #Incorrect Argument Set.
Part of the issue is that the "Co-Located With" is not a direct @row match and some of them return more than 1 item in the cell.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!