EspoCRM allows report results to be grouped using various date functions. Grouping by month is possible, but a custom formula must be used. Grouping by month usually means:
One of the options in the GROUP field is MONTH: (...). The results may not be what one might expect:
EspoCRM groups records using the following SQL when MONTH is selected:
instead of
The good news is support provided a solution that works well. In the GROUP field in a report, use the following code to group by month:
Like this:

Here is a screenshot of the rest of the parameters:

Here are the results:
Code:
Month Count 01 8 02 7 ...
Code:
Month Count 2024-01 4 2024-02 3 ... 2025-01 4 2025-02 4 ...
Code:
GROUP BY DATE_FORMAT(performanceReport.date_start, '%Y-%m');
Code:
GROUP BY DATE_FORMAT(performanceReport.date_start, '%m');
Code:
MAP:(MONTH_NUMBER:(dateStart), 1, '01', 2, '02', 3, '03', 4, '04', 5, '05', 6, '06', 7, '07', 8, '08', 9, '09', 10, '10', 11, '11', 12, '12' )
Here is a screenshot of the rest of the parameters:
Here are the results:
Comment