The built-in agent replies report only offers preset periods. To use your own date range, or to compare this year with last year, create a custom stat with the dates written into the DPQL query.
Create the custom stat
Go to Reports > Stats and click Create statistic.
Add a title.
Open the Raw DPQL tab.
Paste one of the queries below.
Click Save.
Replies per agent for a date range
This query counts agent replies, not internal notes, for each agent:
SELECT DPQL_COUNT() AS 'Replies'
FROM tickets_messages
WHERE tickets_messages.date_created > '2026-08-01'
AND tickets_messages.date_created < '2026-09-01 00:00:00'
AND tickets_messages.is_agent_note = 0
AND tickets_messages.person.is_agent = 1
GROUP BY tickets_messages.person AS 'Agent'
ORDER BY @'Replies' DESC
Change the two dates to the range you want. A date with no time is treated as 00:00.
Replies this year compared with last year
This query shows replies by month for this year and last year. Display it as a line or bar graph.
SELECT DPQL_COUNT() AS 'This year'
FROM tickets_messages
WHERE tickets_messages.date_created = %THIS_YEAR%
AND tickets_messages.is_agent_note = 0
AND tickets_messages.person.is_agent = 1
GROUP BY LPAD(DPQL_MONTHNAME(tickets_messages.date_created), 2, '0') AS 'Month'
LAYER WITH
SELECT DPQL_COUNT() AS 'Last year'
FROM tickets_messages
WHERE tickets_messages.date_created = %LAST_YEAR%
AND tickets_messages.is_agent_note = 0
AND tickets_messages.person.is_agent = 1
GROUP BY LPAD(DPQL_MONTHNAME(tickets_messages.date_created), 2, '0') AS 'Month'
💡 Note: To count tickets that received a reply, instead of individual replies, replace DPQL_COUNT() with DPQL_COUNT_DISTINCT(tickets_messages.ticket.id) in both parts. Each ticket is then counted once per month.