Forum Discussion

ShereeBrown's avatar
ShereeBrown
Qrew Cadet
7 years ago

How do I return the maximum date from multiple date fields but only if not greater than today?

Ultimately I want to send a reminder on the same date as a specific recurring event from a list of 15 multiple date fields.  So I am trying to create a formula field that returns the maximum date that is not greater than today.
I can get the max - but I haven't been able to use an IF function to exclude dates in the future.

Here is an example using just 3 of the 15 fields:
Max([MRI 3 Month], [MRI 6 Month],[MRI  9 Month])

Your help is appreciated.  I find QuickBase so useful in our healthcare environments, but unfortunately, my nursing training is not helpful when trying to write formulas!
  • Try this:
    Max(
      If([MRI 3 Month] <= Today(), [MRI 3 Month]),
      If([MRI 6 Month] <= Today(), [MRI 6 Month]), 
      If([MRI 9 Month] <= Today(), [MRI 9 Month])
    )