Help

How do you filter items by year?

Solved
Jump to Solution
1227 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Anxious
7 - App Architect
7 - App Architect

I have searched for how to do this, but it seems unclear. There is no way to group by year, specifically. You can only select past year, next year, specific number of days, etc.

 

So how do you group items by year?

Airtable Account: Free Plan
Records: 1,200/1,200 1000/1000 (I might have to find a different solution soon)
Automation Runs: ??/100
Extensions: 1/1 (TinyPNG Compression Script, looking for free alternatives)
1 Solution

Accepted Solutions
Sho
11 - Venus
11 - Venus

Add a formula field and use the following formula

IF({date},YEAR({date}))

It is better to have an IF statement because if there is no date, it will be displayed as NaN.

 

See Solution in Thread

2 Replies 2
Sho
11 - Venus
11 - Venus

Add a formula field and use the following formula

IF({date},YEAR({date}))

It is better to have an IF statement because if there is no date, it will be displayed as NaN.

 

Thank you! You would think Airtable would add a feature to sort by year instead of having to use a formula.

And for those of you who are not very code-savvy, here is a more in-depth tutorial.

  1. Create a new formula field. Name it whatever you like. We will call it "Year" for now.
  2. Paste the code into the formula field:  

 

IF({date},YEAR({date}))​

 

  • Change BOTH {date} into the field name that your dates appear in. For example: {Purchase Date}. As you type in between the curly brackets, field suggestions will pop up and you can click on those and it will autofill the field name for you.
  • Anxious_1-1698249949788.png.
  • Click "Create Field". You may have to give it a minute if you have a lot of records in your database.
  • Now that you have a field with years in them you can use the filter or group features. In my case, I have records grouped by the formula field we created called "Year". Now all the purchases made in one year are grouped together.
Airtable Account: Free Plan
Records: 1,200/1,200 1000/1000 (I might have to find a different solution soon)
Automation Runs: ??/100
Extensions: 1/1 (TinyPNG Compression Script, looking for free alternatives)