When the metrics and attributes included with Explore do not meet your needs, you can create your own custom metrics and attributes. In this article, you'll learn about standard calculate metrics and standard calculated attributes. These enable you to create new metrics and attributes using the metrics and attributes included with Explore along with a variety of formulas, mathematical functions, and more.
For a list of all available calculated metrics and attributes, see Calculation types reference. For an introduction to writing formulas, see Getting started with custom metrics and attributes.
This article contains the following sections:
Creating standard calculated metrics
Standard calculated metrics enable you to create completely new metrics to add to your dataset. You can use pre-existing metrics and attributes from your dataset, and functions included with Explore's formula writing language.
IF ([Ticket channel]="Email") THEN [Ticket ID] ENDIF
To create a standard calculated metric
- In query builder, click the calculations icon (
) on the right sidebar.
- Click Standard calculated metric. The Standard calculated metric page opens.
- In the Name field, type a name for your new metric.
- In the Formula field, use the Fields drop-down list to add existing metrics to your formula, or click Explore's auto-complete suggestion as you type the formula.
- If you want to add functions to your formula, click Add under Functions or click Explore's auto-complete suggestion as you type the formula. For a full list of all available functions, see Explore functions reference.
- Check Compute separately if your formula is using existing calculated metrics and attributes, and you do not want to affect their calculations.
- Click Save. The metric is saved to the dataset you currently have loaded.
You can now add this calculated metric to your query. When you click Add in the Metrics panel, you'll find you metric in the Calculated metrics folder.
Creating standard calculated attributes
Standard calculated attributes to create new, custom attributes to add to your dataset. Standard calculated attributes can use existing attributes and metrics, as well as functions from Explore's formula writing language.
- Computed from: The drop-down list displays attributes you can use in your standard calculated attribute.
- Sort like time attribute: If your calculated attribute represents dates, this option places your date values in the correct order.
When you click Add in the Columns, Rows, Explosions, or Filters panels, you'll find your metric in the Calculated attributes folder.
7 Comments
I'd like to have my ticket ID's in a table view hyperlink to the ticket url (like it does out of the box in GoodData), but I can't figure out the syntax for achieving that with a Standard calculated attribute. Can you help me out? Thanks.
Hi Jacob, I'm working on a recipe for doing exactly this, and it should be released sometime next week.
However, as a teaser, try this formula:
Replace 'support.zendesk.com' with your own subdomain.
Also, in the chart configuration menu, choose Chart > Text Interpretation, and choose HTML.
Finally, on the same page make sure that Clickable URL is checked.
This is still in draft, so is unsupported, but hopefully gives you a starting point.
Awesome! That works from the web UI, will it be possible - at some point to also have it available in exported reports? PDF's and Excel is what I'm thinking.
Thanks Rob!
Hi Jacob, I'll make sure to forward that request onto the correct folk. Rob
Finally, here's the link to the new recipe for clickable links - https://explore.zendesk.com/hc/en-us/articles/360002084927-Explore-recipe-Configuring-clickable-links-to-tickets
Thanks a lot Rob!
I'm about ready to give up, so maybe someone has had a similar idea. I'm looking to generate a time series of how many agents took chats per each hour of the day, this would give me my actual staffing that day.
Has anyone tried to do that? I've tried creating a Calculated metric with DCOUNT_VALUES[Agent Name] but it acts funny, like I can't graph it by adding the hour started column, it just gives me the same number for each hour. I feel like I'm close, but I'm just missing something. I'm sure I could wrangle the SQL, but I can't get this.
Please sign in to leave a comment.