Get 40%-off on all premium templates.
Discount code auto-applied at checkout.
Now, I needed to group the previous database by quarter and year. Instead of doing this manually, I found a formula to achieve this.
To be clear, I didn't create this formula. I found it on Red Gregory’s excellent blog and made a few tweaks.
if(month(dateStart(prop("Start Date"))) < 4, "Q1 - " + year(prop("Start Date")), if(month(dateStart(prop("Start Date"))) < 7, "Q2 - " + year(prop("Start Date")), if(month(dateStart(prop("Start Date"))) < 10, "Q3 - " + year(prop("Start Date")), if(month(dateStart(prop("Start Date"))) < 13, "Q4 - " + year(prop("Start Date")), ""))))
It might seem intimidating, but it's simply the same process repeated four times, once for each quarter. The formula essentially determines the month from the date, and identifies the range it falls within. For instance, if it falls within the 4 to 7 range, it's Q2. I've also included the year by using the simple year() formula.