<h2>Aggregation in reporting</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2025" /><meta name="DC.rights.owner" content="(C) Copyright 2025" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="reference" /><meta name="DC.title" content="Aggregation in reporting" /><meta name="abstract" content="Aggregation enables you to apply calculations to data displayed in reports." /><meta name="description" content="Aggregation enables you to apply calculations to data displayed in reports." /><meta name="DC.contributor" content="josephinesne.sokkula" /><meta name="DC.contributor" content="courtney.bradwell" /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2023-08-03" /><meta name="DC.date.modified" content="2024-07-19" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="aggregation-reporting" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>Aggregation in reporting</title></head><body id="aggregation-reporting"> <h1 class="title topictitle1" id="ariaid-title1">Aggregation in reporting</h1> <div class="body refbody"><p class="shortdesc">Aggregation enables you to apply calculations to data displayed in reports.</p> <div class="section" id="aggregation-reporting__section_v55_pgf_3nb"> <ul class="ul" id="aggregation-reporting__ul_zhl_vm3_3nb"><li class="li">The count aggregation gives the number of records in each element of a report.</li><li class="li">Count distinct provides the count of unique values for a given field.</li><li class="li">Average shows the arithmetic mean of the values for a given field.</li><li class="li">Sum shows the total of the aggregated values.</li><li class="li">Minimum and Maximum show the least or greatest values for each displayed category.</li><li class="li">Standard deviation shows data variation from the average value for a given field.</li></ul> <p class="p">If you choose <span class="ph uicontrol">Average</span>,<span class="ph uicontrol">Sum</span>, <span class="ph uicontrol">Count Distinct</span>, <span class="ph uicontrol">Minimum</span>, <span class="ph uicontrol">Maximum</span>, or <span class="ph uicontrol">Standard deviation</span>, you may be able to aggregate on fields from extended tables. See <a class="xref" href="../task/t_AccessFieldExtendedTable.html" title="Learn how to include fields from tables that extend the Task table in a single report. For example, you could include both incidents and problems in a single report.">How to report on extended tables</a>.</p> <p class="p">For information about aggregating on FX currency values, see <a class="xref" href="../concept/fx-currency-values-reporting.html" title="Manage projects in multiple currencies with FX (Foreign Exchange) Currency. You can report on the projects in currency values entered by the user, a reference currency, or both.">FX Currency values in reporting</a>.</p> <div class="note"><span class="notetitle">Note:</span> Aggregation is not supported on histogram, pareto, single score, box, calendar, and list reports.</div> </div> <div class="section" id="aggregation-reporting__section_trq_3df_3nb"><h2 class="title sectiontitle">Count aggregations</h2> <p class="p">The default aggregation is <span class="ph uicontrol">Count</span>. The Count aggregation shows the number of records selected.</p> <p class="p">To show only unique records, select <span class="ph uicontrol">Count Distinct</span>. For example, you want to show the value for the distinct number of task types being performed. Task types being performed for multiple customers are counted multiple times unless you use <span class="ph uicontrol">Count Distinct</span>.</p> <p class="p">The following images compare Count and Count Distinct. The first shows that the raw count of for one column is 632. The second shows that the distinct count for the same column is only 8.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="aggregation-reporting__table_sv3_nfh_3nb" class="table" frame="border" border="1" rules="all"><colgroup><col style="width:50%" /><col style="width:50%" /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d78286e143">Count</th><th class="entry cellrowborder" style="vertical-align:top;" id="d78286e146">Count Distinct</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d78286e143 "><img class="image" id="aggregation-reporting__image_edv_pfh_3nb" src="../image/aggregation-count.png" alt="Bar chart aggregated by Count with four bars, one showing the count for 90 days equals 632." /></td><td class="entry cellrowborder" style="vertical-align:top;" headers="d78286e146 "><img class="image" id="aggregation-reporting__image_y1h_qfh_3nc" src="../image/aggregation-count-distinct.png" alt="Bar chart aggregated by Count Distinct with four bars, one showing the distinct count for 90 days equals 8." /></td></tr></tbody></table> </div> <p class="p">For more information about implementing a report on the Count and Count Distinct aggregations, see <a class="xref" href="../task/aggregate-report-count.html" title="When you create a report, you can aggregate the data on several calculations including the number of records, averages, and standard deviation. The count aggregation gives the number of records in each element of a visualization.">Aggregate a report on count</a>.</p> </div> <div class="section" id="aggregation-reporting__section_t2g_4gf_3nb"><h2 class="title sectiontitle">Average</h2> <p class="p" id="aggregation-reporting__p_dk1_2xw_mbb"><span class="ph uicontrol">Average</span> shows the arithmetic mean of the field you aggregate on. For example, select a duration field. The aggregated data is expressed in terms of days, hours, minutes, and seconds. (You can configure durations to show the level of detail you want.) If you select an integer field, such as <span class="ph uicontrol">Priority</span>, the data is expressed as a decimal value number.</p> <div class="p">When you choose the average aggregation, you can also specify the <span class="ph uicontrol">Percentage calculation</span> The percentage calculation is displayed when you select <span class="ph uicontrol">Show data table</span>.<dl class="dl"> <dt class="dt dlterm">Use Aggregation</dt> <dd class="dd">Shows the percentage as a part of the total amount of averages in a column called <span class="ph uicontrol">Percentage of Average</span>. In this data table, for example, the average duration of the Inquiry, Network, and Software incidents was approximately one day and 16 hours or 30% (or so) of the total average business duration. Average hardware incidents took 12 hours, approximately 9% of the total average business duration for incidents.<br /><img class="image" id="aggregation-reporting__image_r4y_mbh_j1c" src="../image/aggregation-avg.png" alt="Data table showing four categories of incidents, their average business duration, and the percentage of the average time to solve" /><br /></dd> <dt class="dt dlterm">Use Record Count</dt> <dd class="dd">Shows the number of records in each category as a percentage of the total number of records in the visualization in a column called <span class="ph uicontrol">Percentage of Incidents</span>. In this data table, we see the same Average Business Duration for each category, but the percentage is of the number of incidents in that category. For example Inquiry incidents are approximately 17% of all incidents, and software incidents are approximately 77% of all incidents, though the average time to solve these incidents is still 30% (or so). On the other hand, Hardware incidents are less than 1% of all incidents, but the average duration is 9% of the total average time to solve.<br /><img class="image" id="aggregation-reporting__image_rsn_kbh_j1c" src="../image/rec-count-avg.png" alt="Data table showing four categories of incidents, the average business duration of the incidents in the category, and the percentage of total incidents represented by each category." /><br /></dd> </dl> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="aggregation-reporting__table_vr1_rkh_5nb" class="table" frame="border" border="1" rules="all"><colgroup><col style="width:50%" /><col style="width:50%" /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d78286e255">Average duration</th><th class="entry cellrowborder" style="vertical-align:top;" id="d78286e258">Average priority</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d78286e255 "><img class="image" id="aggregation-reporting__image_wr1_rkh_3nd" src="../image/aggregation-avg-dur.png" alt="Bar chart aggregated by Average duration with five bars representing incident categories, one showing the average duration for network incidents of approximately 12 days, 19 hours." /></td><td class="entry cellrowborder" style="vertical-align:top;" headers="d78286e258 "><img class="image" id="aggregation-reporting__image_xr1_rkh_3ne" src="../image/aggregation-avg-prio.png" alt="Bar chart aggregated by Average priority with five bars representing incident categories, one showing the average priority for network incidents of 2.98." /></td></tr></tbody></table> </div> <p class="p">For information about implementing a report with the Average aggregation, see <a class="xref" href="../task/aggregate-report-average.html" title="When you create a report, you can aggregate the data on several calculations including the number of records, averages, and standard deviation. The sum aggregation shows the sum of the field you aggregate on.">Aggregate a report on averages</a>.</p> </div> <div class="section" id="aggregation-reporting__section_kn2_yhf_3nb"><h2 class="title sectiontitle">Sum</h2> <p class="p">Select <span class="ph uicontrol">Sum</span> to show the sum of the field you aggregate on. For example, select a duration field. The aggregated data is expressed in terms of days, hours, minutes, and seconds. (You can configure durations to show the level of detail you want.) Select an integer field, such as <span class="ph uicontrol">Priority</span>, and the data is expressed as a whole number.</p> <p class="p"><img class="image" id="aggregation-reporting__image_rvj_ynh_3nf" src="../image/aggregation-sum-dur.png" alt="Bar chart aggregated by Sum duration with five bars representing incident categories, one showing the sum duration for software incidents of approximately 100 days, 17 hours." /></p> <p class="p">For information about implementing a report on the Sum aggregation, see <a class="xref" href="../task/aggregate-report-sum.html" title="When you create a report, you can aggregate the data on several calculations including the number of records, averages, and standard deviation. The sum aggregation shows the sum of the field you aggregate on.">Aggregate a report on sum</a>.</p> </div> <div class="section" id="aggregation-reporting__section_bcf_zhf_3nb"><h2 class="title sectiontitle">Minimum and Maximum</h2> <p class="p">Select <span class="ph uicontrol">Minimum</span> or <span class="ph uicontrol">Maximum</span> to show the maximum or minimum value for each segment of the report. For example, apply the Maximum aggregation to incidents grouped by priority. The report shows a bar for the incident in each priority with the highest business duration.</p> <div class="p">The following images illustrate maximum and minimum duration using grouped bars to show the different priorities of each category of incident side by side. Stacked bars give the illusion that the element on top of the stack has a greater value. In fact, the bar is only showing the relative value of the two elements. <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="aggregation-reporting__table_zpn_z4h_4nb" class="table" frame="border" border="1" rules="all"><colgroup><col style="width:50%" /><col style="width:50%" /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d78286e356">Maximum duration</th><th class="entry cellrowborder" style="vertical-align:top;" id="d78286e359">Minimum duration</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d78286e356 "><img class="image" id="aggregation-reporting__image_aqn_z4h_8nb" src="../image/aggregation-max-dur-gr.png" alt="Bar chart aggregated by Maximum duration with bars representing incident categories and priorities, one showing the maximum duration for critical software incidents of approximately 23 days, 21 hours." /></td><td class="entry cellrowborder" style="vertical-align:top;" headers="d78286e359 "><img class="image" id="aggregation-reporting__image_nmb_prh_9nb" src="../image/aggregation-min-dur-gr.png" alt="Bar chart aggregated by Minimum duration with bars representing incident categories and priorities, one showing the minimum duration for critical software incidents of approximately 5 days." /></td></tr></tbody></table> </div> </div> <p class="p">For information about implementing a report on the Minimum or Maximum aggregation, see <a class="xref" href="../task/aggregate-report-max-min.html" title="When you create a report, you can aggregate the data on several calculations including the number of records, averages, and standard deviation. The maximum and minimum aggregations show the maximum or minimum value for each segment of the visualization.">Aggregate a report on minimum or maximum</a>.</p> </div> <div class="section" id="aggregation-reporting__section_l5h_l5m_hpb"><h2 class="title sectiontitle">Standard deviation</h2> <p class="p">Select <span class="ph uicontrol">Standard deviation</span> (SD) to see variation from average values for a duration or numeric field. For example, apply the Standard deviation aggregation to business duration of incidents. The report shows deviation from the average business duration of incidents in each priority.</p> <p class="p">Standard deviation is always expressed in the same unit as the data. In the following example, the data is in time units and so is the SD.</p> <p class="p"><img class="image" id="aggregation-reporting__image_ekj_nvm_hpb" src="../image/aggregation-standard-deviation.png" alt="Bar chart aggregated by Standard deviation with bars representing incident categories and priorities, one showing the standard deviation for critical software incidents of approximately 10 days, 9 hours." /></p> <p class="p">For information about implementing a report on the standard deviation aggregation, see <a class="xref" href="../task/aggregate-report-standard-dev.html" title="When you create a report, you can aggregate the data on several calculations including the number of records, averages, and standard deviation. The standard deviation aggregation shows variation from average values for a duration or numeric field in a visualization.">Aggregate a report on standard deviation</a>.</p> </div> </div> </body></html></div>