Troubleshooting errors in Analytics formulas

<div class="body">
<p>In Analytics, you can <a href="https://support.zendesk.com/hc/en-us/articles/4408836190362" target="_blank" rel="noopener noreferrer">write formulas</a> that power custom metrics and attributes. Construct formulas properly to ensure they work. If a formula is incorrect, the formula editor displays an error message in real time. The error message identifies the issue and provides guidance to resolve it.</p>
<p>This article explains how to fix a misconfigured formula in reports. It lists the error messages in the formula editor and provides advice to fix formulas, including examples of incorrect and correct formulas.</p>
<div><div class="note">
<span class="notetitle">Note:</span> Effective August 13, 2024, reports with misconfigured formulas that worked previously stop working. An error message displays instead.</div></div>
<p>See:</p>
<ul id="Explore_troubleshooting_formulas__ul_f1s_zj5_cyb">
<li data-list-item-id="ecf3e31cc27d08912e4a99275360574ba"><a href="https://support.zendesk.com/hc/en-us/articles/4408845804314" target="_blank" rel="noopener noreferrer">Formula writing resources</a></li>
<li data-list-item-id="edf56f1a79a512532c8d2bfad48a744ce"><a href="https://support.zendesk.com/hc/en-us/articles/4408834558746" target="_blank" rel="noopener noreferrer">Analytics functions reference</a></li>
</ul>
</div><div style="margin-bottom: 20px; text-align: right;">
<button id="master-toggle" class="btn fw-semibold text-dark" data-action="expand" style="background-color: #DEF991; border: none; outline: none; border-radius: 7px; padding: 10px 20px; font-size: 15px; transition: background-color 0.2s ease;" onmouseover="this.style.backgroundColor='#cbef6d'" onmouseout="this.style.backgroundColor='#DEF991'">
Expand all tabs
</button>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
const toggleBtn = document.getElementById('master-toggle');

toggleBtn.addEventListener('click', function () {
const action = this.getAttribute('data-action');
const headers = document.querySelectorAll('.accordion');

headers.forEach(header => {
const isActive = header.classList.contains('active');
const panel = header.nextElementSibling; // Grabs the corresponding .panel container

if (action === 'expand' && !isActive) {
// Open it by simulating a standard click
header.click();
} else if (action === 'collapse' && isActive) {
// Close it by simulating a standard click
header.click();
}
});

// Flip button text and states
if (action === 'expand') {
this.setAttribute('data-action', 'collapse');
this.textContent = 'Collapse all tabs';
} else {
this.setAttribute('data-action', 'expand');
this.textContent = 'Expand all tabs';
}
});
});
</script><div class="accordion"><h3 id="h_01KJTSJT4KRNBP12949C5Z3TQ5">Fix misconfigured formulas</h3></div><div class="panel">
<div class="body">
<p>If a calculated metric or attribute contains a misconfigured formula, it does not return results. Identify misconfigured formulas by checking these places:</p>
<ul id="topic_ggs_dz5_jbc__ul_szf_g1v_jbc">
<li data-list-item-id="e0e05dad484a6a613790a0566618971e7">
<strong>Reports library</strong>: Reports that use a misconfigured formula appear in the Updates required category in the Reports library</li>
<li data-list-item-id="e9ea02671fc2f0daac60ecf2c4cd778dd">
<strong>Dashboards library</strong>: Dashboards that use affected reports appear in the Updates required tab in the Dashboards library</li>
<li data-list-item-id="e998e58709695528dbef4add40930104c">
<strong>Report builder</strong>: A warning message appears at the bottom of a report that uses the formula</li>
<li data-list-item-id="e880c272cca6bc17bee5c73f969d10c00">
<strong>Formula editor</strong>: A warning message appears in the formula editor for the affected formula</li>
</ul>
<p>To fix a misconfigured formula, open a report that uses it and correct it in the formula editor. Then republish any dashboards that use the report.</p>
<div><div class="note" id="topic_ggs_dz5_jbc__note_w5s_j1v_jbc">
<span class="notetitle">Note:</span> If a misconfigured formula is nested inside a non-formula-based calculation, such as a <a href="https://support.zendesk.com/hc/en-us/articles/4408827660186" target="_blank" rel="noopener noreferrer">date range metric</a>, a <a href="https://support.zendesk.com/hc/en-us/articles/4408836227866#topic_epc_gw1_fv" target="_blank" rel="noopener noreferrer">group</a>, or a <a href="https://support.zendesk.com/hc/en-us/articles/4408836227866#topic_fsd_gw1_fv" target="_blank" rel="noopener noreferrer">set</a> attribute, no error message appears in the non-formula-based calculation. To see the error message in the formula editor, open the original nested calculation.</div></div>
<div>
<div class="note tip" id="topic_ggs_dz5_jbc__note_hkr_k1v_jbc">
<span class="tiptitle">Tip:</span> Ask report creators to fix their formulas. The Created by column in the Reports library shows which user created each report. If you do not see Created by, add it by clicking the columns icon (<img src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/explore_columns_icon.png" alt="Columns icon" width="17" height="17" id="topic_ggs_dz5_jbc__image_czz_cbv_jbc">) and selecting <strong>Created by</strong>.</div>
<p>To update a misconfigured formula:</p>
</div>
</div>
<ol id="topic_ggs_dz5_jbc__ol_nwp_m1v_jbc">
<li data-list-item-id="eb3fe2aa819c5570c152442f9c38b97fa">In Analytics, click the <strong>Reports</strong> icon (<img src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/Explore_query_icon.png" alt="Reports icon" width="16" height="16" id="topic_ggs_dz5_jbc__image_rqf_fbv_jbc">) to open the Reports library</li>
<li data-list-item-id="edbc7540b18b24da8067f06d968e11e81">Click the <strong>Updates required</strong> tab</li>
<li data-list-item-id="e569e5a891eaf1096a6c364a95c2b89b1">Click one of the listed reports to open it</li>
<li data-list-item-id="e9c096a6c137a8615fe7c25329878130c">For each calculated metric or attribute:<ul>
<li data-list-item-id="ed87a783318f99b2ca3322f4beaffb15c">Click the metric or attribute and then click the pencil icon</li>
<li data-list-item-id="e5eff291b54851a876854f0629ce39e2e">Check the formula to identify any misconfigurations. The misconfigured parts of the formula are underlined. An error message tells you what needs to be corrected. <br><img class="wysiwyg-image-resized" style="width: 500px;" src="https://support.zendesk.com/hc/article_attachments/10569884315418" alt="Standard calculated metric error">
</li>
<li data-list-item-id="e11c10b7c740162d86db1eeb88c16caf4">(Optional) <a href="https://support.zendesk.com/hc/en-us/articles/4408821925914" target="_blank" rel="noopener noreferrer">Create a copy of the metric or attribute</a> before making any changes. This prevents impact on existing reports during troubleshooting.</li>
<li data-list-item-id="e1e4507f65eedf7e5cd4b82cb77b04b91">Fix the issues with the formula specified by the error message. See the sections below for additional guidance with specific error messages. <br>Fixing a calculated metric or attribute’s formula in one report also fixes it in any other report it is used in.</li>
<li data-list-item-id="ea82dd1c34b5ab6134fdec5f63ee854cd">(Optional) If you created a copy of the metric or attribute, update the original</li>
</ul>
</li>
<li data-list-item-id="e9213f103b76eff00e4181eb65b041e94">Save the report</li>
</ol>
<p>To republish affected dashboards:</p>
<ol id="topic_ggs_dz5_jbc__ol_x2x_m1v_jbc">
<li data-list-item-id="e671d1d3e985f5ead7aa261e18c0295c1">In Analytics, click the <strong>Dashboards</strong> icon (<img src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/Explore_dashboard_icon.png" alt="Dashboards icon" width="16" height="16" id="topic_ggs_dz5_jbc__image_vgn_fbv_jbc">) to open the Dashboards library</li>
<li data-list-item-id="e728eab4f09ff63e416106a861031f0da">Click the <strong>Updates required</strong> tab</li>
<li data-list-item-id="ea5889afddf5a8be26aba9c47aba06012">Hover your mouse over one of the dashboards and click <strong>Edit</strong>
</li>
<li data-list-item-id="e35ba2b78c0dd12bced4afaca00d904a7">In the dashboard, click the drop-down arrow next to <strong>Share</strong> and select <strong>Publish</strong>. The next time users look at the shared dashboard, they’ll see the latest version</li>
<li data-list-item-id="e9f3388979eb52e4070357b0d235cb46a">Click <strong>Publish</strong>
</li>
</ol>
</div><div class="accordion"><h3 id="h_01KJTSJT4KH6YZ60TJNRJYWAAK">Types of error messages in the formula editor</h3></div><div class="panel">
<div class="body"><p>This section lists these types of error messages and provides advice on resolving them:</p></div>
<div class="topic nested2" id="topic_dv4_pz5_jbc">
<h3 id="h_01KJTSJT4KYDPYJY353KQ1KFHS">Most common formula errors</h3>
<div class="body"><p>See the sections below for additional guidance on specific error messages.</p></div>
</div>
<div class="topic nested2" id="topic_cgw_kj5_cyb">
<h3 id="h_01KJTSJT4KJVY840SJ2C8SYRGX">General syntax error messages</h3>
<div class="body">
<p>If you see the following error message, it means the syntax in your formula is incorrect:</p>
<ul id="topic_cgw_kj5_cyb__ul_s5r_2k5_cyb"><li data-list-item-id="ef6a9ca82340388713356637ae3627432">"There’s an issue with the formula. Check your calculation syntax and try again." <br><img class="wysiwyg-image-resized" style="width: 500px;" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/explore_formula_editor_general_syntax_warning.png" alt="General syntax warning" id="topic_cgw_kj5_cyb__image_udq_kk5_cyb">
</li></ul>
<p>The table below lists the most common reasons for this error.</p>
<h4 id="h_01KXE1H341RQJ1HHVFH4V4VXAZ">Reasons for general syntax errors</h4>
<p>This table covers common syntax misconfigurations and their corrections.</p>
<ul>
<li data-list-item-id="ee92237dd236d83829280a2ba74849fe8">You opened but did not close a bracket or parenthesis, or closed more than you opened. <br>Incorrect: IF ([Ticket status] = "Solved")) THEN [Ticket ID] ENDIF <br>Correct: IF ([Ticket status] = "Solved") THEN [Ticket ID] ENDIF</li>
<li data-list-item-id="ea48865d57fa701777cdb916377519e2d">You opened but did not close the quotation marks. <br>Incorrect: [Ticket status] = "Solved <br>Correct: [Ticket status] = "Solved"</li>
<li data-list-item-id="ecd9bb1b9d612525e32b25371e91040dc">You did not wrap the attribute in brackets. <br>Incorrect: Ticket status = "Solved” <br>Correct: [Ticket status] = "Solved”</li>
<li data-list-item-id="e782e80375eeb911c3045e18da4273359">You did not add an aggregator in front of a metric. <br>Incorrect: First reply time (min) <br>Correct: SUM(First reply time (min))</li>
<li data-list-item-id="e0f1c20fe7f5eb3487c59d18d00854f4a">You are missing an essential part of the IF statement. In this example, the ENDIF is missing. <br>Incorrect: IF ([Ticket status] = "Solved") THEN [Ticket ID] <br>Correct: IF ([Ticket status] = "Solved") THEN [Ticket ID] ENDIF</li>
</ul>
</div>
</div>
<div class="topic nested2" id="topic_fn5_lj5_cyb">
<h3 id="h_01KJTSJT4KPWST3JEB6B4B53SW">Data type error messages</h3>
<div class="body">
<p>The tables below show error messages related to <a href="https://support.zendesk.com/hc/en-us/articles/5784398875802" target="_blank" rel="noopener noreferrer">data types</a> in the formula editor, including incorrect and correct versions of a formula.</p>
<p>The sections below cover data type error messages:</p>
<ul id="topic_fn5_lj5_cyb__ul_rpz_pk5_cyb">
<li data-list-item-id="e10c2a4fa3bcc668a2e869c98bc517121"><a href="#topic_cdl_pj5_cyb">Equal, not equal, and less than or greater than expressions</a></li>
<li data-list-item-id="edaf7fcd1591fde114ccefb48e6a9ca53"><a href="#topic_txd_rj5_cyb">Arithmetical operations and text value joining</a></li>
<li data-list-item-id="e024b41a9dea3fe7cd50b756bc2be76b2"><a href="#topic_s4l_sj5_cyb">Functions</a></li>
</ul>
</div>
<div class="topic nested3" id="topic_cdl_pj5_cyb">
<h3 id="h_01KJTSJT4KW1HYSJT2TG2V8EGR">Equal, not equal, and less than or greater than expressions</h3>
<div class="body">
<h4 id="h_01KXE1H3416T5FRPMMBYDQG03J">Errors for equal, not equal, and comparison expressions</h4>
<p>This section outlines syntax rules for comparisons and matching types.</p>
<ul>
<li data-list-item-id="e9cf0eddb53ecca4fe359d61f9b37b500">Can't use [Project stage] as text and 1 as number. Use the same type. <br>Incorrect: [Project stage]=1 <br>Correct: [Project stage]="1" <br>Use the same data type on both sides of the equality expression. A value wrapped in quotation marks is text, but a number without quotation marks is a number. Because <strong>Project stage</strong> is a text attribute, the value should have quotation marks.</li>
<li data-list-item-id="ecd2cca49da32d0325c50c7972e53ae86">Can't use [Ticket country] as text and [User country code] as number. Use the same type. <br>Incorrect: [Ticket country]!=[User country code] <br>Correct: [Ticket country]!=[User country name] <br>Use the same data type on both sides of the inequality expression. <strong>Ticket country</strong> is text, so the attribute on the right should be text too.</li>
<li data-list-item-id="e5bd5745bc6f1b246fc8c3ad10d1d7ce8">Can't use [Ticket assigned - Date] as text and 26 as number. Use only numbers or only text. <br>Incorrect: [Ticket assigned - Date] &gt;= 26 <br>Correct: [Ticket assigned - Date] &gt;= "2023-01-26" <br>Use the same data type on both sides of the greater than or equal to expression. In this case, it’s a date wrapped in quotation marks.</li>
<li data-list-item-id="ea1b980caa5bfb1808916108edf8ee7f5">Can't use VALUE(Agent replies) as number and 2 as text. Use only numbers or only text. <br>Incorrect: VALUE(Agent replies)&lt;”2” <br>Correct: VALUE(Agent replies)&lt;2 <br>Use the same data type on both sides of the less than expression. A value wrapped in quotation marks is text, but a number without quotation marks is a number. Because <strong>Agent replies</strong> is a metric, the value should be a number, so do not use quotation marks.</li>
</ul>
</div>
</div>
<div class="topic nested3" id="topic_txd_rj5_cyb">
<h3 id="h_01KJTSJT4KAEQ6TPBWC4N65W1Y">Arithmetical operations and text value joining</h3>
<div class="body">
<h4 id="h_01KXE1H3418RQ2VBZWPEHED5B3">Errors for arithmetical operations and text joining</h4>
<p>This section outlines calculations rules and how to join attributes.</p>
<ul>
<li data-list-item-id="ed951b5026bf83e4f7022879b9eec0ec3">Can't use [Ticket group] as text and [Ticket ID] as number. Use only numbers or only text. If necessary, use the STRING function to transform numbers to text, or the NUMBER function to transform text to numbers. <br>Incorrect: [Ticket group]+[Ticket ID] <br>Correct: [Ticket group]+STRING([Ticket ID]) <br>This formula joins text as showcased in <a href="https://support.zendesk.com/hc/en-us/articles/4408820587930" target="_blank" rel="noopener noreferrer">Analytics recipe: Joining attributes</a>. Transform the numeric attribute into text via the STRING function.</li>
<li data-list-item-id="ec2f1c5d107e100d42c07198ef7cd6507">Can't use VALUE(Full resolution time (min)) as number and [Additional task time] as text. Use only numbers or only text. If necessary, use the STRING function to transform numbers to text, or the NUMBER function to transform text to numbers. <br>Incorrect: VALUE(Full resolution time (min))+[Additional task time] <br>Correct: VALUE(Full resolution time (min))+NUMBER([Additional task time]) <br>This formula sums two values. <strong>Full resolution time (min)</strong> is a number, but <strong>Additional task time</strong> is a text field with numeric values inside. The best approach is to <a href="https://support.zendesk.com/hc/en-us/articles/4408883152794" target="_blank" rel="noopener noreferrer">create a new numeric custom field in Support</a> for recording additional task time, which works without transformation in Analytics. Alternatively, transform the text attribute into a number via the NUMBER function.</li>
<li data-list-item-id="e0527907a33c16d349f70350a428cbb20">Can't use VALUE(First reply time (min)) as number and "60" as text. Use only numbers. <br>Incorrect: VALUE(First reply time (min))/"60" <br>Correct: VALUE(First reply time (min))/60 <br>Arithmetic operations like division require numeric values. A value in quotation marks is text, but a number without quotation marks is a number. Do not use quotation marks here.</li>
<li data-list-item-id="e2d65877c9857d29f55aef00ce506f295">Can't use COUNT(Comments) as number and [Comment public] as text. Use only numbers. <br>Incorrect: COUNT(Comments)-[Comment public] <br>Correct: COUNT(Comments)-COUNT(Public comments) <br>Arithmetic operations like subtraction require numeric values. <strong>Comment public</strong> is a text attribute. Use a metric instead.</li>
</ul>
</div>
</div>
<div class="topic nested3" id="topic_s4l_sj5_cyb">
<h3 id="h_01KJTSJT4KPJ86P2MDDDHDP5SN">Functions</h3>
<div class="topic nested2" id="topic_gfl_mj5_cyb"><div class="body">
<h4 id="h_01KXE1H341HA3Y4EYDWZSZ9Y2R">Errors when using functions</h4>
<p>This section details functions criteria and configuration errors.</p>
<ul>
<li data-list-item-id="ea63d128e7ea43f98dc158016703b661a">Can't use different types in the THEN statement. 1 is number and "0" is text. Use the same type <br>Incorrect: IF [Ticket status]="Open" THEN 1 ELSE "0" ENDIF <br>Correct: IF [Ticket status] = "Open" THEN 1 ELSE 0 ENDIF or IF [Ticket status] = "Open" THEN "1" ELSE "0" ENDIF <br>Values after THEN and ELSE keywords should be the same type. Quotation marks indicate text, while their absence indicates a number. Fix this error using one of the two ways above.</li>
<li data-list-item-id="e2002d59d65200b067c340dbda233eee5">Can't use 1 as number and 2 as number. Use only booleans <br>Incorrect: IF 1 OR 2 THEN [Ticket ID] ENDIF <br>Correct: IF VALUE(Agent replies) = 1 OR VALUE(Agent replies) = 2 THEN [Ticket ID] ENDIF <br>Conditions inside the IF statement should be TRUE or FALSE. The correct syntax is: IF TRUE OR FALSE THEN [Ticket ID] ENDIF. Add conditions instead. The formula editor does not assess the validity of the conditions themselves.</li>
<li data-list-item-id="e9741e557e14e31a443fd24005e3062f1">Can't use number in this function. Use text <br>Incorrect: NUMBER([Ticket ID]) <br>Correct: NUMBER([Ticket external ID]) <br>The NUMBER function transforms text attributes with numeric values into text. The Ticket ID attribute is a numeric field and cannot be used with this function. Text attributes like Ticket external ID can.</li>
<li data-list-item-id="e9dcbe816bc582380a1d80aceb1ce41d9">Can't use text, boolean in this function. Use text, text or number <br>Incorrect: LINK("https://subdomain.zendesk.com/agent/organizations/" + STRING([Ticket organization ID]), [Organization check box]) <br>Correct: LINK("https://<em>yoursubdomain</em>.zendesk.com/agent/organizations/" + STRING([Ticket organization ID]), [Ticket organization name]) or LINK("https://<em>yoursubdomain</em>.zendesk.com/agent/organizations/" + STRING([Ticket organization ID]), STRING([Organization check box])) <br>The LINK function expects text as the second parameter. Do not use a boolean attribute. Use a text attribute or transform the boolean attribute via the STRING function.</li>
<li data-list-item-id="ef66806a71f4ca902c71a255c85591823">Can't use [Ticket created - month] as text here. Use timestamp type <br>Incorrect: DATE_LAST([Ticket created - Month]) <br>Correct: DATE_LAST([Ticket created - Timestamp]) <br>The DATE_LAST function expects a timestamp attribute.</li>
<li data-list-item-id="ec7fccc82f846339c8e53c0d56dc286dd">Can't use different condition types. Use text type <br>Incorrect: SWITCH ([Ticket group]) {CASE "Support": "1" CASE 3: "2" } <br>Correct: SWITCH ([Ticket group]) {CASE "Support": "1" CASE "3": "2" } <br>Because <strong>Ticket group</strong> is a text attribute, all case conditions should be text type. Wrap the number 3 in quotation marks to make it text.</li>
<li data-list-item-id="ef8343b6283f59e64a245daa5e4378f95">Can't use different types in the SWITCH statement. "1" is text and 2 is number. Use the same type <br>Incorrect: SWITCH ([Ticket group]) {CASE "Support": "1" CASE "IT": 2 } <br>Correct: SWITCH ([Ticket group]) {CASE "Support": "1" CASE "IT": "2" } <br>The results of all cases should be the same type. Wrap the number 2 in quotation marks to make it text.</li>
<li data-list-item-id="ed3141f977b6f2ce81bc0411472a8b447">You can't use different types in the array. Use the same type <br>Incorrect: IN([Leg instance], ARRAY(1, "2", "3")) <br>Correct: IN([Leg instance], ARRAY(1, 2, 3)) <br>Use quotation marks for all values if it’s a text attribute, or do not use them if it’s a numeric attribute. <strong>Leg instance</strong> is numeric, so do not use quotation marks.</li>
<li data-list-item-id="e18c70071436af1b19924f2c0be692282">Invalid time unit for the given dates <br>Incorrect: DATE_DIFF([Ticket solved - Date], [Ticket created - Date], "minutes") <br>Correct: When using the DATE_DIFF function, ensure the time unit (third parameter) matches the date fields' precision. For dates without time details (hours, minutes), only "year", "month", or "day" are allowed. Using unsupported units like "minutes" will trigger an error.</li>
</ul>
</div></div>
</div>
</div>
<div class="topic nested2" id="topic_gfl_mj5_cyb">
<h3 id="h_01KJTSJT4K2DVMVPS38TSK8ZD2">Metric aggregator error messages</h3>
<div class="body">
<h4 id="h_01KXE1H3410ZV2AERWJ3Z0BTV0">Errors when using metric aggregators</h4>
<p>This section outlines aggregator calculation issues across custom attributes.</p>
<ul>
<li data-list-item-id="e53fdd86df93ec7085cc8e8e75109ad9b">Can’t use the SUM(database metric) aggregator. Use VALUE aggregator, ATTRIBUTE_FIX or ATTRIBUTE_ADD function. <br>Incorrect: IF SUM(Requester wait time (min))&gt;120 THEN "Long wait time" ELSE "Short wait time" ENDIF <br>Correct: IF VALUE(Requester wait time (min))&gt;120 THEN "Long wait time" ELSE "Short wait time" ENDIF <br>This error message appears in calculated attributes, not metrics. Use the VALUE aggregator here.</li>
<li data-list-item-id="e43c2914397ceb846eb4a3c066a19480f">Can't use COUNT(Solved tickets) aggregator. Use VALUE aggregator, or wrap the metrics in ATTRIBUTE_FIX or ATTRIBUTE_ADD function. <br>Incorrect: IF COUNT(Solved tickets)&gt;1 THEN "Solved" ELSE "Unsolved" ENDIF <br>Correct: IF ([Ticket status - Unsorted] = "Solved" OR [Ticket status - Unsorted] = "Closed") THEN "Solved" ELSE "Unsolved" ENDIF <br>This error message appears in calculated attributes. Fix this by using the same conditions as the <strong>Solved tickets</strong> metric.</li>
<li data-list-item-id="ea5fc778c86cc0c987e686cab67665f61">Can't use COUNT(Ticket assignments to Dev) in a calculated attribute. Wrap the metric in ATTRIBUTE_FIX or ATTRIBUTE_ADD function. <br>Incorrect: IF COUNT(Ticket assignments to Dev)&gt;1 THEN "Solved" ELSE "Unsolved" ENDIF <br>Correct: IF ATTRIBUTE_FIX(COUNT(Ticket assignments to Dev), [Update ticket ID])&gt;1 THEN "Multiple escalations" ELSE "One or no escalations" ENDIF <br>This error message appears in calculated attributes. If the original formula is complex, use the ATTRIBUTE_FIX function to specify aggregation levels. Calculate this on the <strong>Update ticket ID</strong> level.</li>
<li data-list-item-id="e3a5d77713142e374cf633222881e1775">Time in status already contains aggregators. Either replace AVG with SUM, or ensure that Time in status contains only VALUE aggregators. <br>Incorrect: AVG(Time in status) <br>Correct: SUM(Time in status) <br>Time in status is a nested metric with an existing aggregator. Calculating an average on top of a median is not allowed. Set the top-level aggregator to SUM or change the lower-level aggregator to VALUE.</li>
</ul>
</div>
</div>
<div class="topic nested2" id="topic_gjl_nj5_cyb">
<h3 id="h_01KJTSJT4KGH91WNNKN7E2EK1E">Other error messages</h3>
<div class="body">
<h4 id="h_01KXE1H341K918S35K5JJ1NYAA">Miscellaneous error messages</h4>
<p>This section reviews dataset typos and self-referencing metric issues.</p>
<ul>
<li data-list-item-id="eb4df7791c4db2c21c724fef657fe0bae">[Ticket statuses] does not exist in this dataset. Check if there is a typo. <br>Incorrect: [Ticket statuses] ="Solved" <br>Correct: [Ticket status] ="Solved" <br>Common reasons for this error include: The attribute or metric is from another dataset; Typo in the name; Name is not in the user’s profile language; Formula references a calculation with quotation marks in the name. Remove them to resolve the error.</li>
<li data-list-item-id="ec477791c92eef90f836bd3ffbed59c00">[Calculated group] has a wrongly configured formula. Fix it before saving. <br>Incorrect: IF [Calculated group] = "light" THEN TRUE ELSE FALSE ENDIF <br>Correct: <strong>Calculated group</strong> has a misconfiguration. Fix that first.</li>
<li data-list-item-id="e7b889a0830670d58e57e9970c6a49339">Calculation is referencing itself here COUNT(Sales tickets). Remove or replace it. <br>Incorrect: COUNT(Sales tickets)/COUNT(Tickets) <br>Correct: Do not add a formula inside of itself. In this case, the user is editing <strong>Sales tickets</strong> and trying to include it in the formula.</li>
<li data-list-item-id="e1c2aa854cb78a09f03a2dadbe4cbaabb">Max of 3 levels in a calculation. Remove the nested calculation here: SUM((2nd reply time) <br>Incorrect: MED(2nd reply time) / MED(First reply time (min) <br>Correct: The <strong>2nd reply time</strong> metric is nested. Only up to 3 nested levels are allowed.</li>
<li data-list-item-id="e554af7d2a4895d7f549a9762eae007dc">Can't use [Ticket Group] here. INCLUDES_ALL can only be used on tag attributes. <br>Incorrect: INCLUDES_ALL([Ticket Group], "Support", "Sales") <br>Correct: INCLUDES_ALL([Ticket tags], "support", "sales") or IN(Ticket group, ARRAY( "Support", "Sales")) <br>INCLUDES functions work only with tag attributes. Use the IN function for other attributes.</li>
<li data-list-item-id="ef4031b9f1e74d2d23608080a47347e59">[Date range calculated metric] has a wrongly configured formula. Fix it before saving. <br>Incorrect: COUNT([Date range calculated metric]) <br>Correct: <a href="https://support.zendesk.com/hc/en-us/articles/4408827660186-Adding-date-calculated-metrics" target="_blank" rel="noopener noreferrer">Date range calculated metrics</a> are not supported in calculated metrics. Use a <a href="https://support.zendesk.com/hc/en-us/articles/4408831485466-Using-result-metric-calculations" target="_blank" rel="noopener noreferrer">result metric calculation</a> instead.</li>
<li data-list-item-id="e405a585b95172fbf6a891f36223d0829">You can't use [function] here. Use INCLUDES_ALL or INCLUDES_ANY for tag attributes. <br>Incorrect: IF (CONTAINS([Ticket tags],"sales")) THEN "Sales" ELSE "Prod" ENDIF <br>Correct: INCLUDES_ALL([Ticket tags], "Sales", "Prod") <br>Only INCLUDES_ALL and INCLUDES_ANY report on tags.</li>
</ul>
</div>
</div>
</div>