Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Creating a formula to filter for a date range as well as a check box

Topic Labels: Formulas
660 3
cancel
Showing results for 
Search instead for 
Did you mean: 

I’m looking for help to write a formula that will help filter records that meet these requirements. I can’t seem to get it done using the filter function.

Where date is within the next week
or
Where date is within the last 3 days
and
Where check box is not marked

3 Replies 3

Hi and welcome to Airtable!

Do you mean literaly within the next week, like within week 39 now, or do you mean within the next 7 days?

Try this:

IF( 
  OR(
    DATETIME_FORMAT(Date, 'W') = DATETIME_FORMAT( DATEADD(Today(), 1, 'weeks') , 'W'),
    And(
      IS_BEFORE(Date, Today()),
      IS_AFTER(Date, DATEADD(Today(), -4, 'days')),
      Checkbox = 1
    )
  ),
"Meets criteria",
"Don't meet criteria"
)

Thank you so much - I actually figured out a way to force it to work by reordering the filters!