Creating standard calculated metrics and attributes: Hands-on tutorial

<body>
<p id="docs-hc-snippet" style="display: none;">In this article, you'll use what you learned inCreating standard calculated metrics and attributesto create a standard calculated attribute by working through an example. You can also create a standard calculated metric by following the same process.</p>
<div class="article-banners">
<div id="docs-wmp-link">
<a href="https://support.zendesk.com/hc/en-us/articles/5411234991258-plan" rel="noopener" target="_blank">What's my plan?</a>
</div>

<div class="article-banner" id="suite_pee">
<table>
<tbody>
<tr>
<td>
<strong>All Suites</strong>
</td>
<td>Professional, Enterprise, or Enterprise Plus</td>
</tr>
</tbody>
</table>
</div>

<div class="article-banner" id="support_with_explore_pe">
<table>
<tbody>
<tr>
<td>
<strong>Support with</strong>
</td>
<td>Explore Professional or Enterprise</td>
</tr>
</tbody>
</table>
</div>

</div>

<div class="body">

<p class="p">In this article, you'll use what you learned in <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408824243738" target="_blank">Creating standard calculated metrics and attributes</a> to
create a standard calculated attribute by working through an example. You can also
create a standard calculated metric by following the same process.</p>
<div class="p">
<div class="note note" id="Explore_metrics_for_beginners__note_nyz_pqd_3yb">
<span class="notetitle">Note:</span> Zendesk doesn't provide support for creating or
troubleshooting custom metrics or attributes. If you have a problem, ask a question
in our <a class="xref" href="https://community.zendesk.com/analytics-16" target="_blank">community section</a>.</div>
</div>
<p class="p">This article contains the following sections:</p>
<ul class="ul" id="Explore_metrics_for_beginners__ul_n5j_tc3_lhb">
<li class="li"><a class="xref" href="#topic_sql_vrl_bxb">Step 1: Determine what you want to report on</a></li>
<li class="li"><a class="xref" href="#topic_qyy_wyh_lhb">Step 2: Start creating your report</a></li>
<li class="li"><a class="xref" href="#topic_ybt_qfj_lhb">Step 3: Create a standard calculated attribute</a></li>
<li class="li"><a class="xref" href="#topic_ekl_rfj_lhb">Step 4: Add your attribute to your report</a></li>
<li class="li"><a class="xref" href="#topic_vyk_5gj_lhb">Step 5: Edit your attribute's formula</a></li>
<li class="li"><a class="xref" href="#topic_x4p_byh_nhb">Next steps</a></li>
</ul>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_sql_vrl_bxb">
<h2 class="title topictitle2" id="ariaid-title2">Step 1: Determine what you want to report on</h2>
<div class="body">
<p class="p">In this example, you want to create a report that shows the following information: </p>
<ul class="ul" id="topic_sql_vrl_bxb__ul_qlq_vql_bxb">
<li class="li">The median first reply time, in minutes, for the Support tickets in your Zendesk
account</li>
<li class="li">Which channel the tickets were created in</li>
</ul>
<p class="p">After consulting <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408827693594" target="_blank">Metrics and attributes for Zendesk Support</a>, you know
that you can use the <strong class="ph b">First reply time (min)</strong> metric and the <strong class="ph b">Ticket
channel</strong> attribute to create your report.</p>
<div class="p">
<div class="note tip" id="topic_sql_vrl_bxb__note_idw_rsl_bxb">
<span class="tiptitle">Tip:</span> Zendesk maintains a list of the default
metrics and attributes for the datasets in each product. See <a class="xref" href="https://support.zendesk.com/hc/en-us/sections/4405298911258" target="_blank">Building reports</a>.</div>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_qyy_wyh_lhb">
<h2 class="title topictitle2" id="ariaid-title3">Step 2: Start creating your report</h2>
<div class="body">
<p class="p">Now that you know what information you're looking for, you can start creating your
report.</p>
<p class="p"><strong class="ph b">To start creating your report</strong></p>
<div class="p">
<ol class="ol" id="topic_qyy_wyh_lhb__ol_gzf_1sl_bxb">
<li class="li">In Explore, click the <strong class="ph b">Reports</strong> icon (<img class="image" id="topic_qyy_wyh_lhb__image_dbb_vql_bxb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/Explore_query_icon.png">).</li>
<li class="li">Click the <strong class="ph b">New report</strong> button.</li>
<li class="li">On the <strong class="ph b">Select a dataset</strong> page, select the <strong class="ph b">Support - Tickets</strong>
dataset and click <strong class="ph b">Start report</strong>. The report builder opens.</li>
<li class="li">In the <strong class="ph b">Metrics</strong> panel, click <strong class="ph b">Add</strong> and select <strong class="ph b">Duration between
events - Calendar hours (min)</strong> &gt; <strong class="ph b">First reply time (min)</strong>.</li>
<li class="li">In the <strong class="ph b">Rows</strong> panel, click <strong class="ph b">Add</strong> and select <strong class="ph b">Ticket</strong> &gt;
<strong class="ph b">Ticket channel</strong>.</li>
</ol>
</div>
<p class="p">You'll end up with a chart that looks similar to this:</p>
<p class="p"><img class="image" id="topic_qyy_wyh_lhb__image_ygn_4jn_2xb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/explore_tutorial_median_reply_by_channel_1.png" width="600">
</p>
</div>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested1" id="topic_ybt_qfj_lhb">
<h2 class="title topictitle2" id="ariaid-title4">Step 3: Create a standard calculated attribute</h2>
<div class="body">
<p class="p">Based on the report you created in <a class="xref" href="#topic_qyy_wyh_lhb">step
2</a>, you know that some channels have a much faster median first reply time
than others. Now you want to know how the first reply time correlates to the ticket
volume for each channel. You decide to update your report to answer the following
questions:</p>
<ul class="ul" id="topic_ybt_qfj_lhb__ul_vwm_kmd_3yb">
<li class="li">How many tickets are being created in each channel?</li>
<li class="li">For each channel, how many tickets have a fast first reply time, and how many
have a slow first reply time?</li>
</ul>
<p class="p">Because there's no default Explore attribute for "fast first reply time" or "slow
first reply time," you'll need to create a standard calculated attribute to define
these concepts and reflect them in your report. You want to create a standard
calculated attribute with the following logic:</p>
<ul class="ul" id="topic_ybt_qfj_lhb__ul_lpn_lmd_3yb">
<li class="li">If a ticket’s first reply time is less than 10 minutes, group it under "Fast
response"</li>
<li class="li">If a ticket’s first reply time is greater than or equal to 10 minutes, group it
under "Slow response"</li>
</ul>
<p class="p">After consulting <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408834558746" target="_blank">Explore functions reference</a>, you determine that the best
function to use in your formula is <strong class="ph b">IF THEN ELSE</strong>. This function allows you to
evaluate a condition (the first reply time) and then take an action based on the
outcome of that evaluation (labeling the response fast or slow). The following
formula is an efficient way to return the results you're looking for: </p>
<pre class="pre codeblock"><code>IF VALUE(First reply time (min)) != NULL AND VALUE(First reply time (min)) &gt;= 10 THEN "Slow response"
ELIF VALUE(First reply time (min)) != NULL THEN "Fast response"
ENDIF</code></pre>
<div class="p">
<div class="note tip" id="topic_ybt_qfj_lhb__note_jsc_4md_3yb">
<span class="tiptitle">Tip:</span> The "IF VALUE(First reply time (min)) !=
NULL" condition means that tickets with no replies won’t be grouped with the
fast or slow responses.</div>
</div>
<p class="p">Now that you have your formula, it's time to create your standard calculated
attribute.</p>
<p class="p"><strong class="ph b">To create the standard calculated attribute</strong></p>
<ol class="ol" id="topic_ybt_qfj_lhb__ol_qp4_pw3_lhb">
<li class="li">In your report, click the <strong class="ph b">Calculations</strong> menu (<img class="image" id="topic_ybt_qfj_lhb__image_djz_l3l_bxb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/Explore_calculations.png">) and select <strong class="ph b">Standard calculated
attribute</strong>.<p class="p"><img class="image" id="topic_ybt_qfj_lhb__image_i1r_2jf_cxb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/explore_tutorial_create_standard_calculated_attribute.png" width="500"></p>
</li>
<li class="li">In the <strong class="ph b">Name</strong> field, enter a descriptive name such as <strong class="ph b">Response time fast
or slow?</strong> You'll need this name later when you add your calculated
attribute to the report.</li>
<li class="li">In the <strong class="ph b">Formula</strong> field, paste in the
formula:<pre class="pre codeblock" id="topic_ybt_qfj_lhb__codeblock_w3b_cnd_3yb"><code>IF VALUE(First reply time (min)) != NULL AND VALUE(First reply time (min)) &gt;= 10 THEN "Slow response"
ELIF VALUE(First reply time (min)) != NULL THEN "Fast response"
ENDIF</code></pre>
</li>
<li class="li">In the <strong class="ph b">Computed from</strong> dropdown, choose <strong class="ph b">Ticket channel</strong>. This ensures
that tickets are counted based on the Ticket channel attribute only.</li>
<li class="li">Click <strong class="ph b">Save</strong> to save the attribute and close the <strong class="ph b">Standard calculated
attribute</strong> panel.</li>
</ol>
<p class="p">Now that you've created a standard calculated attribute, it acts just like any of the
default attributes. It's available to use in any reports within the same dataset,
and can be used by anyone who has access to that dataset.</p>
</div>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested1" id="topic_ekl_rfj_lhb">
<h2 class="title topictitle2" id="ariaid-title5">Step 4: Add your attribute to your report</h2>
<div class="body">
<p class="p">Next, you'll use your new attribute by adding it to your report. You’ll also add a
new metric to count the number of tickets.</p>
<p class="p"><strong class="ph b">To add a metric and your standard calculated attribute to your report</strong></p>
<ol class="ol" id="topic_ekl_rfj_lhb__ol_xhn_2dj_lhb">
<li class="li">In the <strong class="ph b">Metrics</strong> panel, click <strong class="ph b">Add</strong> and select <strong class="ph b">Tickets</strong> &gt;
<strong class="ph b">Tickets</strong>, and then click <strong class="ph b">Apply</strong>.</li>
<li class="li">Click the <strong class="ph b">Tickets</strong> metric you just added and change its aggregator to
<strong class="ph b">D_COUNT</strong>.</li>
<li class="li">In the <strong class="ph b">Rows</strong> panel, click <strong class="ph b">Add</strong>.</li>
<li class="li">From the list of attributes, select <strong class="ph b">Calculated attributes</strong> &gt; <strong class="ph b">Response
time fast or slow?</strong> (the attribute you created above) and click
<strong class="ph b">Apply</strong>.</li>
<li class="li">To filter out tickets with no replies (the blank rows), select the <strong class="ph b">Result
manipulation</strong> menu (<img class="image" height="16" id="topic_ekl_rfj_lhb__image_n2m_3nd_3yb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/Explore_result_manipulation.png" width="16">), click <strong class="ph b">Metric
filter</strong>, select <strong class="ph b">Remove blank values</strong> under <strong class="ph b">MED(First reply time
(min))</strong>, and click <strong class="ph b">Apply</strong>.<p class="p"><img class="image" id="topic_ekl_rfj_lhb__image_vrn_mnd_3yb" src="https://zen-marketing-documentation.s3.us-west-1.amazonaws.com/docs/en/explore_tutorial_metric_filter.png" width="500"></p>
</li>
</ol>
<p class="p">Your report now shows, for each channel, how many tickets had a fast response (first
reply within 10 minutes) or a slow response (first reply after 10 minutes).</p>
<p class="p"><img class="image" id="topic_ekl_rfj_lhb__image_wnt_snd_3yb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/explore_tutorial_median_reply_by_channel_2.png" width="600"></p>
<p class="p">Note that the <strong class="ph b">First reply time (min)</strong> column values have changed from the first
version of your report. Because you added your calculated attribute to the report,
the <strong class="ph b">First reply time (min)</strong> metric is now being sliced by that attribute in
addition to the <strong class="ph b">Ticket channel</strong> attribute. In other words, instead of showing
the median first reply time for all tickets in a given channel, the metric now shows
the median first reply time for tickets in the “Fast response” and “Slow response”
groups for each channel.</p>
</div>
</div>
<div aria-labelledby="ariaid-title6" class="topic nested1" id="topic_vyk_5gj_lhb">
<h2 class="title topictitle2" id="ariaid-title6">Step 5: Edit your attribute's formula</h2>
<div class="body">
<div class="p">In this section, you'll continue to work with the standard calculated attribute you
created previously, but you'll edit it to return slightly different results. In this
example, you want to change the attribute's logic so that the following conditions
apply:<ul class="ul" id="topic_vyk_5gj_lhb__ul_ixl_hbh_cxb">
<li class="li">If a ticket’s first reply time is less than 10 minutes, group it under "Fast
response” (same as before)</li>
<li class="li">If a ticket’s median first reply time is greater than or equal to 10 minutes
but less than 30 minutes, group it under "Slow response"</li>
<li class="li">If a ticket’s first reply time is greater than or equal to 30 minutes, group
it under "Very slow response" </li>
</ul>
</div>
<p class="p">To update your attribute, you'll nest multiple <strong class="ph b">IF THEN ELSE</strong> functions to
evalute the extra condition. However, the basic structure of the formula is similar
to what you've already created.</p>
<p class="p"><strong class="ph b">To edit the formula</strong></p>
<ol class="ol" id="topic_vyk_5gj_lhb__ol_xcs_j3j_lhb">
<li class="li">In the <strong class="ph b">Rows</strong> panel, click the <strong class="ph b">Response time fast or slow?</strong>
attribute.</li>
<li class="li">Click the pencil icon below the attribute's name.<p class="p"><img class="image img-screenshot" id="topic_vyk_5gj_lhb__image_flv_4ly_2pb" src="https://zen-marketing-documentation.s3.us-west-1.amazonaws.com/docs/en/explore_creating_custom_tutorial_4.png" width="400"></p>
The <strong class="ph b">Standard calculated attribute</strong> panel opens, showing your
standard calculated attribute.</li>
<li class="li">Replace the formula with the following:<div class="p">
<pre class="pre codeblock"><code>IF VALUE(First reply time (min)) != NULL AND VALUE(First reply time (min)) &gt;= 30 THEN "Very slow response"
ELIF VALUE(First reply time (min)) != NULL AND VALUE(First reply time (min)) &gt;= 10 AND VALUE(First reply time (min)) &lt; 30 THEN "Slow response"
ELIF VALUE(First reply time (min)) != NULL AND VALUE(First reply time (min)) &lt; 10 THEN "Fast response"
ENDIF</code></pre>
</div>
<p class="p">This is a useful way to avoid having to write multiple <strong class="ph b">IF THEN
ELSE</strong> functions. You could also use the <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408831957658-Adding-multiple-conditional-expressions-with-SWITCH" target="_blank">SWITCH function</a> to achieve a
similar result.</p>
</li>
<li class="li">Click <strong class="ph b">Save</strong>.</li>
</ol>
<p class="p">Explore automatically recalculates your report and displays the results, which now
include the "Very slow response" group.</p>
<p class="p"><img class="image" id="topic_vyk_5gj_lhb__image_is3_b4d_3yb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/explore_tutorial_median_reply_by_channel_3.png" width="600"></p>
</div>
</div>
<div aria-labelledby="ariaid-title7" class="topic nested1" id="topic_x4p_byh_nhb">
<h2 class="title topictitle2" id="ariaid-title7">Next steps</h2>
<div class="body">
<p class="p">Explore has hundreds of default metrics and attributes and a wide range of functions
you can use in your formulas. Experiment with creating your own calculated metrics
and attributes. The following articles are a great reference to help you:</p>
<ul class="ul" id="topic_x4p_byh_nhb__ul_ipl_tyh_nhb">
<li class="li"><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408845804314" target="_blank">Formula writing resources</a></li>
<li class="li"><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408831146266" target="_blank">Using result manipulations and
calculations</a></li>
</ul>
</div>
</div>
<script id="docs-schema-markup" type="application/ld+json">{
"@context": "https://schema.org",
"@type": "TechArticle",
"@id": "https://support.zendesk.com/hc/en-us/articles/4408839385754",
"url": "https://support.zendesk.com/hc/en-us/articles/4408839385754",
"headline": "Creating standard calculated metrics and attributes: Hands-on tutorial",
"description": "You learn how to create and edit standard calculated attributes to categorize ticket first reply times by response speed and incorporate these attributes into reports for analysis.",
"articleSection": "Performing calculations",
"datePublished": "2021-10-16T05:38:22+00:00",
"dateModified": "2026-04-17T22:03:30.476991+00:00",
"inLanguage": "en-US",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/4408839385754"
},
"author": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"publisher": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"isPartOf": {
"@type": "WebSite",
"name": "Zendesk Help",
"@id": "https://support.zendesk.com/hc/"
},
"about": {
"@type": "SoftwareApplication",
"name": "Zendesk",
"@id": "https://www.zendesk.com",
"softwareAddOn": {
"@type": "SoftwareApplication",
"name": "Explore",
"@id": "https://support.zendesk.com/hc/en-us/sections/4405298856346"
}
}
}</script>
</body>