Looking for last date before today, referencing unique identifier
Hi, I'm looking for a formula that will reference a unique identifier (Unique Object ID) in a list of other Object IDs, and collect the last date but that is less than today. The following formula works to return the last date, but some return a future date which I don't want. I need the date that is closest to today but is not in the future.
So far I have this and it returns the last date, referencing the Unique Object ID = Patient ID:
=MAX(COLLECT({240 Data Mapping by Patient Range 13}, {240 Data Mapping by Patient Range 6}, [Patient ID]@row))
I tried adding the @cell <= today() but it didn't work:
=MAX(COLLECT({240 Data Mapping by Patient Range 13}, {240 Data Mapping by Patient Range 6}, [Patient ID]@row), @cell <= TODAY())
Thanks in advance!
Best Answers
-
Assuming that first range is the date range, it would look somethign like this...
=MAX(COLLECT({240 Data Mapping by Patient Range 13}, {240 Data Mapping by Patient Range 13}, @cell < TODAY(), {240 Data Mapping by Patient Range 6}, [Patient ID]@row))
-
This worked beautifully. Thank you!
Answers
-
Assuming that first range is the date range, it would look somethign like this...
=MAX(COLLECT({240 Data Mapping by Patient Range 13}, {240 Data Mapping by Patient Range 13}, @cell < TODAY(), {240 Data Mapping by Patient Range 6}, [Patient ID]@row))
-
This worked beautifully. Thank you!
-
Happy to help. 👍️
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!