# Re: Show category by date range

Solved
661 1
cancel
Showing results for
Did you mean:
5 - Automation Enthusiast

Hi,

I have a table with several categories and they all have a month assigned to them (essentially types of activities being undertaken in that month).

I want to create a view that shows one category across specific months. For example “Real Estate” in March, April and May. I can’t do it with filters, because I would need to combine AND OR filters. I saw a post about combining formulas: https://support.airtable.com/hc/en-us/articles/221561507-Combining-AND-and-OR-filters but can’t seem to write the correct formula for this.

I would really appreciate any help!

Thank you so much!

1 Solution

Accepted Solutions
18 - Pluto

Try this formula, changing the `{Category}` and `{Month}` field names to match your actual base:

``````AND(Category = "Real Estate", OR(Month = "03 - Mar", Month = "04 - Apr", Month = "05 - May"))
``````

Or, slightly shorter:

``````AND(Category = "Real Estate", SWITCH(LEFT(Month, 2), "03", 1, "04", 1, "05", 1, 0))
``````

Filter all records that output a 1.

3 Replies 3
18 - Pluto

Try the “Group” function, and you can group your categories by month and category.

18 - Pluto

Try this formula, changing the `{Category}` and `{Month}` field names to match your actual base:

``````AND(Category = "Real Estate", OR(Month = "03 - Mar", Month = "04 - Apr", Month = "05 - May"))
``````

Or, slightly shorter:

``````AND(Category = "Real Estate", SWITCH(LEFT(Month, 2), "03", 1, "04", 1, "05", 1, 0))
``````

Filter all records that output a 1.

5 - Automation Enthusiast

Thank you so much - that’s exactly what I needed!