Group by month/year of date attribute

#1

I apologize if I’m missing how to do this but I have a date field and would like to group items by the date fields month or year. Currently I can only group by the specific date.

If I create a formulas using MONTH or YEAR based on the date I cannot use these to group by.

I would like to see all items listed grouped under Jan/feb/March etc and also be able to group by year- 2019, 2020, 2021 etc. Currently I have to create separately label attributes and assign a date and then “month” and “year” separately to be able to group items.

0 Likes

#2

Hello @robynlcowie! Unfortunately it’s only possible to group or filter by the whole date, not parts of the date (like month or year). The best workaround, for now, would be using labels for this purpose. :confused:

0 Likes

#3

If I remember correctly there’s a formula for changing a date to a year. You could create this attribute, group by it and then hide it. That should work.

Edit: I just tested it. While the function works fine:

YEAR
Syntax: YEAR(date)
Explanation: Returns the year specified by a given date.

But infinity cannot (yet?) group by formula. But you can use the sort function. It´s not the same, but in table view at least it´s pretty similar.
The filter works though, if you want to use this.

1 Like