Explore's built-in metrics and attributes give you great flexibility to create reports. However, every business is different, and eventually you might want to create reports using metrics and attributes that aren't included in Explore by default. To bridge this gap, you can create standard calculated metrics and standard calculated attributes.
This article contains the following sections:
Related articles:
Understanding standard calculated metrics and attributes
Standard calculated metrics and attributes allow you to create new metrics and attributes by combining default metrics and attributes with a variety of formulas, mathematical functions, and more. For example, you could create a standard calculated metric to return a per-hour cost, or create a standard calculated attribute to return a value based on a certain condition.
Standard calculated metrics and attributes are located in the Calculations menu () in the right sidebar of the Explore report builder.
As with default metrics and attributes, you need to add standard calculated metrics and attributes to your report after creating them (see Using metrics and attributes in reports).
Creating a standard calculated metric
IF ([Ticket channel]="Email") THEN [Ticket ID] ENDIF
To create a standard calculated metric
- In Explore, create a new report or open an existing one.
- Click the Calculations menu (
) and select Standard calculated metric.
- In the Name field, enter a descriptive name for your new metric.Note: Don’t include quotation marks, parentheses, or square brackets in the name. Doing so will cause errors if the metric is referenced in another calculated metric or attribute, or in a result metric calculation.
- In the Formula field, type or paste the formula that the metric should use. If
you type your formula, you can click the auto-complete suggestions as they
appear.
Alternatively, you can click the following fields to select elements to add to your formula:
- Fields > Select a field: Shows a list of existing metrics and attributes, including default and custom.
- Functions > Add: Shows a list of available functions. For more information about each one, see Explore functions reference.
- If your formula uses existing calculated metrics and attributes and you don't want to affect their original calculations, select Compute separately .
- Click Save. The metric is saved to the dataset you selected when you started the report.
You can now add this calculated metric to your report. When you click Add in the Metrics panel, you'll find your metric in the Calculated metrics folder.
Creating a standard calculated attribute
Standard calculated attributes allow you to create new, custom attributes to add to your reports. For example, you could create a standard calculated attribute that groups results based on defined values. See Creating standard calculated metrics and attributes: Hands-on tutorial.
To create a standard calculated attribute
- In Explore, create a new report or open an existing one.
- Click the Calculations menu (
) and select Standard calculated attribute.
- In the Name field, enter a descriptive name for your new attribute.Note: Don’t include quotation marks in the name. Doing so will cause errors if the attribute is referenced in another calculated metric or attribute.
- In the Formula field, type or paste the formula that the metric should use. If
you type your formula, you can click the auto-complete suggestions as they
appear.
Alternatively, you can click the following fields to select elements to add to your formula:
- Fields > Select a field: Lists the existing metrics and attributes, including default and custom.
- Functions > Add: Lists the available functions. For more information about each one, see Explore functions reference.
- Configure the additional settings as needed:
-
Computed from: Lists the metrics and attributes you can use in your
standard calculated attribute. Important: Although you can select standard calculated metrics from the list, doing so can lead to inaccurate results and is not supported. Use only default metrics in your standard calculated attributes.
-
Sort like time attribute: If your calculated attribute represents a date,
this option places your date values in the correct order.Note: This option applies only to single attributes. Combining attributes, such as adding a year to the end of a month, results in alphabetical sorting instead of chronological.
-
Computed from: Lists the metrics and attributes you can use in your
standard calculated attribute.
- Click Save. The attribute is saved to the dataset you selected when you started the report.
You can now add this calculated attribute to your report. When you click Add in the Columns, Rows, Explosions, or Filters panels, you'll find your attribute in the Calculated attributes folder.
Next steps
Now that you understand the basics of creating standard calculated metrics and attributes, you're ready to put this knowledge into practice. See Creating standard calculated metrics and attributes: Hands-on tutorial to practice creating a calculated attribute by working through an example.
58 comments
Jahn Jerenz Bronilla
Hi Team - trying to create Same Day Resolution (SDR) Metric in Explore however, it seems that some values are not being captured.


Here's the calculation I created.

Should be Ticket Created Date = Ticket Solved Date like the below:
However, there's some result that are incorrect. See sample:
Can someone help me identify what's wrong with my calculation?
Thank you
Jerenz
0
Bonnie
Hi Jerenz! It looks like we were able to help you with this question via a ticket. I'll just share the metric my colleague helped you with here, in case anyone else is following along the conversation.
IF ([Ticket created - Date]=[Ticket solved - Date])
THEN [Ticket ID]
ENDIF
0
Jahn Jerenz Bronilla
Hi Bonnie Leib - yes and totally helpful :) Thanks for your help.
0
GS Admin
Hi ,
i have created a Group attribute with the agents from our group in the Support-tickets dataset .
Is there a way i can copy the same in the other datasets .
i want to use the group attribute as a filter in a dashboard which has different datasets ,so i i have the same attribute in all datasets the i could link and use the attribute.
Please help!
0
Gab Guinto
Hi Gaurav,
You can duplicate an attribute and select which dataset you want to save it to. Here's a sample:
Note that the attribute will only work if the elements referenced in the formula can also be found (with an identical name) in the other dataset. If, for example, your custom group is based on the native Assignee name attribute, then there should be no issue; in the Backlog dataset though, you may have to edit the copied attribute since "Assignee name" is not available in that dataset.
0
Rebecca Che
Hi, team. We have a custom field in zendesk support, so when the agent clicks the field, we can see it as true in Explore, else is False. I'm trying to use the calculated metrics to only count the True value as below but the system didn't show any data. any suggestion?
Thanks
0
Brandon (729)
Hi Rebecca Che,
Very Close! Try:
0
Catalin
Hi guys. I'm interested in creating a custom metric to show the timestamp (or time lapsed) for the first internal note on each ticket. This used to be possible in the old system (GoodData) but I can't figure it out in Zendesk Explore. Any ideas please? Many thanks!
0
Saxon Clay
Hey Catalin, Explore has the 'DATE_FIRST' function that you can use in the Updates dataset to get the first internal comment.
Is what I have for a custom 'First Update' attribute in my instance, changing 'Comment public' to FALSE and adding some separation by Ticket ID (additional column/row) should get what you're looking for.
1
Catalin
Hey Saxon, thanks a lot for the tip! I managed to get it working. Based on your suggestion, I also found some useful details (that I didn't find before) here: https://support.zendesk.com/hc/en-us/articles/4408833381402-Working-with-earliest-and-latest-date-functions#topic_hrb_wdy_5pb
1
Tim Bechtold
Hi Reporting and Analytics Team,
I want to add 2 custom Standard Calculated Metrics to an Assignee Activity report:
Average Tickets Solved per Hour and Average Tickets Updated per Hour.
Tim
0
Dave Dyson
If you want to do this yourself, you'll need to start by cloning the dashboard -- then you can add your own metrics: Cloning dashboards
If you're wanting these to be added in to the standard default dashboards in Explore, the best way to get this idea in front of our product team is to post in our Feedback - Reporting and analytics (Explore) community topic, using this template to format your feedback. Thanks!
0
Saxon Clay
Tim Bechtold You should use DCOUNT(Solved Tickets) instead of COUNT(Tickets) in the calculations.
Beyond that though, I'd recommend not using custom metrics for this and instead use Result Metric Calculation:
This lets you run calculations on the existing metrics in your report as well as hiding source columns if desired. Since it runs off of the existing data in your query there's usually no problems with it incorrectly scoping data.
0
Dave Dyson
0
Bob Gaul
Hi,
I am trying to add a column to a query to indicate whether an agent is an internal or external resource. This is defined by the assignee email address.
The following formula is showing an error message when trying to add this attribute:
IF (CONTAINS([Assignee email]]),"@example.com"))
THEN "External"
ELSE "Internal"
ENDIF
What can I do to correct this?
0
Erin O'Callaghan
Hi Bob Gaul, I think there's an extra bracket and parenthesis after Assignee email that's causing the error. I tested the formula and it seems to work when written like this:
0
Bob Gaul
Thank you so much Erin O'Callaghan! I've no idea why I didn't think of that myself...
0
MAD Monica Maldonado
Hi there,
I need to create an attribute that shows me something like:
- x requester emails created [0-10] tickets
- x requester emails created [10-20] tickets
....
any idea?
i have tried a simple one like
if (value(End-user submitted tickets)
>50) then ">50"
else "<=50"
Endif
but it does not provide proper results.
Any idea?
0
Walter
Is there any way to lock calculated metrics and attributes from being altered / deleted by another user? I think this would be a useful feature while allowing admin override.
1
Dane
You can create a customized dataset and just give editors the ability to view and save reports.
Users will not have access to the "Calculations" section. Even though they can still access the existing calculated metrics or attributes, any changes they made will not be saved.
Hope this helps!
1
Walter
Thanks Dane!
0
John DiGregorio
Dane your suggestion for grouping orgnazations worked like a champ. I am now stuck on how to report on month and year combined in a calculated attribute. In this article it says it will sort them alphabetically - is there any way around that?
0
Dane
Can you share your calculated attribute for me to determine what can be done?
0
Ulises
Hi,
I am trying to obtain only the last timestamp of when the ticket was updated with a public comment by the end-user and from the agent.
I am running into the following 2 issues:
These are the queries I have:
0
Gab Guinto
With those formula, the attributes will return the timestamps of all end user and agent comments. To get the most recent timestamps, you can try using the Latest date functions. You can find sample recipes here: Working with earliest and latest date functions.
0
Oliver Jacob
With the below formula, you can concatenate year, month and day to date in Excel. 1. Select a blank cell to place the concatenated date, and enter formula =A2&"/"&B2&"/"&C2 into the formula bar, then press the Enter key
Select the cells you want to format. Press CTRL+1. In the Format Cells box, click the Number tab. In the Category list, click Date, and then choose a date format you want in Type.
0
Lea Møller Baun
I'm trying to make an attribute that sees the following.
Tickets solved and tickets created withtin the last 3 hours. Any idea on how to make that work? My metrics are tickets solved and tickets created, but what would you put to make the attribute just look at the last 3 hours?
0
John DiGregorio
Lea Møller Baun - add a filter for Last Updated
0
Walter
Hi Lea Møller Baun,
Try this for Tickets Created within 3 hours:
IF(DATE_DIFF(NOW(),[Ticket created - Date],"nb_of_hours") < 3) THEN [Ticket ID] ENDIF
Try this for Tickets Solved within 3 hours:
IF(DATE_DIFF(NOW(),[Ticket solved - Date],"nb_of_hours") < 3) THEN [Ticket ID] ENDIF
0
Lea Møller Baun
Thanks Walter,
We are getting there!
It shows something, but not quite the data. It shows 15.000 tickets, which is not the right data. :/ Do you have any other ideas?
0