This formula has a closing parenthesis in the wrong place, after the first mention of {Date B}
. This closes the OR()
function prematurely and compares its output with BLANK()
, which I’m surprised actually works.
That aside for a moment, one optimization you can use is to take advantage of how Airtable looks at fields simply in terms of filled or unfilled. An empty field equates to False
, while a filled field equates to True
(most of the time; numeric fields with a 0 are the exception because 0 also equates to False
). Because of that, it’s not necessary to compare a field against BLANK()
.
With all of that considered, here’s how you can simplify the two-field version:
IF(OR({Date A}, {Date B}), IF({Date A}, {Date A}, {Date B}))
That formula first tests to see if a date is in either field. If so, and it’s in {Date A}
, use that; otherwise use {Date B}
.
For three fields, it’s only a little more complex.
IF(OR({Date A}, {Date B}, {Date C}), IF({Date A}, {Date A}, IF({Date B}, {Date B}, {Date C})))
Here’s the same thing split across several lines to make the logic a little more clear:
IF(
OR({Date A}, {Date B}, {Date C}),
IF(
{Date A}, {Date A},
IF(
{Date B}, {Date B}, {Date C}
)
)
)