Help

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

Topic Labels: Formulas
2158 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Adam_Reker
4 - Data Explorer
4 - Data Explorer

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
Per_Carlen
7 - App Architect
7 - App Architect

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?

Per_Carlen
7 - App Architect
7 - App Architect

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!