group dates by quarters


Ive read several discussions but still havent found the answer. 

I have a table column that groups a date field (formatted d/M/yyyy). Display format is "Aug 2016". Group by repeating labels is checked.

This column is linked to a bar chart. Input format MMM yyyy, display format "Aug 2016".

this gives me bars for each month which is fine.

My data spans more than 2 years and I can only see about 1 year on a chart as there is no more width to show more bars. How can i change the date grouping to quarters ?


1 comment

  • 0
    Shima Beigzadeh

    Hi Adnaan, 

    If your quarters align with standard quarters, that is, Jan 1 - Mar 31, Apr 1 - Jun 30, etc, you can use the DATE_STARTOF function to align all your dates to the start of the quarter. 
    If you use the raw date column with "d/M/yyyy format" then use below formula: 
    DATE_STARTOF(DATE(@A:A;, "d/M/yyyy"), "quarter")
    and If you are referencing to the date column from your table with "MMM yyyy format" then use result reference for your date column in your formula.  
    DATE_STARTOF(DATE(&DateColumn;, "MMM yyyy"), "quarter") 

    If your quarters do not align with standard quarters, extra date manipulation would be needed.

    I hope this helps!

Please sign in to leave a comment.