Grouping sets of information together based on a year

Hi, I"m building a dashboard kind of page and I need to be able to group the data together by a year, for instance a summary of all entries in 2020, a summary of all entires in 2019…Is there a way to filter based on a year if the year is part of a date and have that group the items together?

Yes you can, viewing all data in one block and allowing users to filter data in the block using selected field content. If you have a problem using your existing date format, create an Airtable formula in a new field to extract only the Year from it and filter using this new field.

YEAR({Date Field})
or
DATETIME_FORMAT({Date Field}, 'YYYY')

Alternatively:

You could set up identical, multiple blocks and each have a conditional filter of “Year contains”; then add a different year to create the filtering for each block. Lots of blocks if you have lots of years!

Yes, just what @MarkSchofield said. You can also add DATETIME_FORMAT({Date Field}, ‘MMM’) or DATETIME_FORMAT({Date Field}, ‘MMMM’). I take it one step further and add single select fields in Airtable for my Softr filter list. Softr filter dropdown fields need Single Select or Multi-Select Fields (or Linked records) in Airtable to link automatically and update the available items in the list. I use an Airtable automation to add the output of the Airtable formulas above into a single select field, so they become available for use in Softr’s dropdown list field. For the month, I type out the month names and put them in the correct order, then in Softr, I set the order ‘As Defined in the Source’

1 Like