# 6 Kommentare

Community Moderator

Hi @...

You should be able to create a Standard Calculated metric for that, below I did a quick check for a simple way to do this in the "Tickets" dataset:

IF ([Ticket status - Unsorted] = "Solved"
OR [Ticket status - Unsorted] = "Closed")
AND [Ticket created - Date] = [Ticket solved - Date]
THEN [Ticket ID]
ENDIF

I'm not sure if there are some edge cases I haven't accounted for, but you could give it a try and let me know :)

Hope that helps you get started!

Community Moderator

This is what it could look like

That worked perfectly.  Thank you.

Thank you for the suggestion Jacob, that worked for me!

I'm now trying to modify this slightly to calculate the average resolution time of these tickets, but can't quite figure it out. Do you have any recommendations to return only tickets that were solved same-day and the average first resolution time?

Hi Jeffrey,

Following Jacob's brilliant formula, you will return only tickets that were solved and created the same day.
In your query, to keep only the tickets that were created/solved the same day, you'll have to remove from your metric filter the 0 and blank values.

To this query, you can then add the metric "First resolution time" which is available in minutes/hour/days, as mentioned in this article: Metrics and attributes for Zendesk Support, and then change the aggregator of the metric to AVG, as explained in this documentation: Choosing metric aggregators
If you keep the level of details Jacob's showed in his example, you'll get the average first resolution time for each day.

Now if you don't want this level of details, and only want to know the AVG resolution time for all your tickets that were created and solved the same day, you'll need to do the following:

1) Create an attribute that will return 1 when a ticket was created/solved the same day.
The formula would be the following one:
IF ([Ticket status - Unsorted] = "Solved"
OR [Ticket status - Unsorted] = "Closed")
AND ([Ticket created - Date] = [Ticket solved - Date])
THEN 1
ENDIF

2) Add this attribute to your filters and select only 1 as a value.

You should then have something like this.

Hope that helps! :)
Community Moderator

This is awesome Maude, thank you! 🙌

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.