Trend reports
Trend reports show how the value of one or more items changes over time. Values along the horizontal axis of the trend report represent the time measurement. Values on the vertical axis represent the changes to the items being monitored.
Users with the report_admin role can define the ranges that are used in a trend chart report. See Report ranges for information on creating report ranges.
An example of an item that changes over time is incident count. The incident count will likely increase during the first few months after a product upgrade is released. Over time, the number of incidents reported drops as users become more accustomed to the changes in the product.
Trend chart example
Parent Topic:Report types
Create a trend report
Create a trend report to show how the value of one or more data element changes over time.
Before you begin
Role required: itil, report_user, report_group, report_global, report_admin, or admin. To create a meaningful report, you must have the right to access the data you want to report on.
Procedure
Navigate to All > Platform Analytics > Library > Data Visualizations and select New.
On the Data tab, give the report a name that reflects the information being grouped.
Select the applicable source for the report.
| Data source | Also called a report source, a data source is a table with filters applied to provide a single source of information for all users. For more information, see Report sources.Note: If you select a data source used by existing reports, a notification prompts you to view them. |
| Table | The raw data from a table with no filters applied. When you select a table, its short description appears below the table name. For trend reporting, you can also select a remote table, which aggregates, in memory, data retrieved from an external source. Then select a Trend by field option to aggregate its data. To learn more about remote tables, see Retrieving external data using remote tables and scripts |
| External import | Choose an existing imported report source, or select the Upload icon \( Image omitted: upload-icon.png Upload icon\) to import a new file. See <a href="../create-report-with-imported-data-source/">Create a Core UI report from an imported Microsoft Excel document</a>. |
| MetricBase | MetricBase enables you to collect, retain, analyze, and visualize custom time series data on the ServiceNow AI Platform. For more information, see MetricBase. |
On the Type tab, enter Trend in the filter, select the Trend report type from the Other section, and click Next.
The application shows a preliminary version of the report. To view the updated report at any time, select Run.
On the Configure tab, fill in the following fields and select Next.
| Field | Description |
|---|---|
| Group by | Group report data using the values of this field. For example, in an incident report grouped by Assignment group, all incidents that belong to Software, Service Desk, and Network are placed in separate groups. To group by fields on extended tables, see How to report on extended tables. Select the info icon Image omitted: icon-info.png for a description of the selected field. Configured function fields appear in this list after you save the report. No alternative text supplied Note:
|
| Additional group by | Extra fields to group the report by. When you select Additional group by fields or function fields, the report includes a control at the bottom that allows you to group the report by any one of the additional fields. To group by fields on extended tables as well, see How to report on extended tables. Select the info icon Image omitted: icon-info.png for descriptions of the selected fields Configured function fields appear in this list after you save the report. No alternative text supplied Note:
|
| Display data table | Select this option to show report data in a list below the report. The list appears on dashboards where the report is added.All report visualizations show the report data when the glide.ui.section508 system property is set to true. The glide.ui.section508 property overrides the Display data table field. |
| Configure function field | Configure fields based on calculation of multiple inputs including arithmetic functions. For more information, see Report on function fields. Function field results are calculated when the report is run. You can use the results for aggregations and grouping. You have to save the report before you can configure function fields.Configured function fields appear in the Group by and Additional group by lists after you save the report. |
| Trend by | Table field whose values you want to show in a time sequence. Select the info icon Image omitted: icon-info.png for a description of the selected field. Note: If you selected a remote table in the Table field, the option you select in this field aggregates the data that was retrieved from an external source and aggregated in memory. To learn more about remote tables, see Retrieving external data using remote tables and scripts.No alternative text supplied |
| per | Time period to group data by. The range of available time periods depends on the calendar that you selected. Time periods range from an hour to a year. You can also specify a date.Note: If reporting per week: When the report range includes more than one calendar year, inconsistencies result when a week is split between two years. To show data values more accurately according to ISO weeks, add and enable the glide.db.aggregates.trend.use_iso_week property in the System Properties [sys_properties] table. |
| Aggregation | Mathematical calculation to perform on the data. The default is Count, which shows the number of records selected.To show only unique records, select Count Distinct. Select Average, Sum, or Count Distinct, to show a list of fields from the selected Table. Select a field to Aggregate by from this list. If you group the report by a field and select an Average aggregate, you get the average of each group. If a Total value is shown, it is the average of these group averages, not of the individual field values. Select Minimum or Maximum to show the maximum or minimum value for each segment of the report. For more information on aggregation options, see Aggregation in reporting. If you choose Average,Sum, Count Distinct, Minimum, or Maximum, you may be able to aggregate on fields from extended tables. See How to report on extended tables. For information about aggregating on FX currency values, see FX Currency values in reporting. |
| Percentage calculation | Method of calculating percentages. The percentage appears when you point to a report segment, such as a bar on a bar report. This field appears when Aggregation is set to Average, Sum, or Count Distinct.
For example, a report shows assets by department with the Aggregation set to Sum and the percentage calculated using aggregation. If the total cost of assets is $100,000 and the cost of assets for Customer Support is $10,000, the percentage for Customer Support is 10%.
For example, a report shows incidents by priority. Out of 500 incident records, 200 have low priority. The percentage for the low-priority section is 40%. |
| Set Value Formatting | Enables you to configure how to show numerical values in reports, including decimal precision, rounding, minimum and maximum duration units, and abbreviations for duration units. See Value formatting in reports. Note: Decimal precision does not work on currency fields. |
| Max number of groups | Maximum number of groups that the Trend by condition returns. This limit only affects the x-axis. The number of groups that the Group by condition returns on the y-axis is not affected. The groups with highest values are shown first. Any groups beyond the limit are combined into the single group Other. If you select Show all, the 50 largest Trend by groups are displayed on the x-axis. If there are more than 50 groups, the remainder are grouped as Other. |
| Show Other | Check box to include the Other group in the report. The Other group contains data for all groups that exceed the number specified in Max number of groups. |
Configure the sort order of the applicable fields in the report (column, row, Group by, Stack by or Trend by depending on the report type).
Select the filter icon (
Filter icon for lists\) and choose **Add Sort**.
1. In the Sorting Order list, choose the field you want to sort on and then choose **a-z** or **z-a** for alphabetical order or reverse alphabetical order.
The list contains all possible fields from the report's source and fields on extended, or related, tables. The only effective values, however, are the fields chosen for the current report \(column, row, Group by, Stack by, or Trend by depending on the report type\).
**Note:** On fields from dot-walked \(extended\) tables, you can only sort on date fields.
2. Select the sort plus icon \(
Sort plus icon\) to configure additional sorting order conditions. \(Select the sort minus icon \( \[Omitted image "sort-order-minus-icon.png"\] Alt text: Sort minus icon\) to delete configured sorting order conditions.\)
3. Select **Save**.
For fields of the type Choice list, sort order is not determined alphabetically based on Label, it is sorted based on the **Value** of the choice field. For multi-level pivot table and heatmap reports, sort order is determined by the sequence of the choices in the list.
Report sorted by priority choice list
- To limit the information displayed in the report, select the filter icon (
Filter icon\) and specify conditions to filter the report data.
To learn how to construct conditions, see [Condition builder](../../platform-user-interface/c_ConditionBuilder.md).
**Note:** In aggregated and list reports, language-dependent filter conditions may return zero results on localized instances.
On the Style tab, fill in the fields as appropriate to configure the appearance of the report.
Select Save to continue editing the visualization, or Save and close to return to the Analytics Overview main screen.
What to do next
- Select the Report info icon (
Info icon\) and add a description of the report.
- Select the sharing icon (
Sharing icon\) to open the **Sharing** menu. On this menu, you can add the report to a dashboard, export the report to PDF, publish the report to the web, and set visibility and schedules.
Trend report style options
Change the look of your trend report.
When you create or edit a report, click the Style tab for options to configure the look of your report. The options are organized under two or more of the following tabs: General, Title, Legend, and Axis. To see how the report looks with the changed settings, click Save.
| Field | Description | |
|---|---|---|
| General | ||
| Chart color | Source of colors used in the report.If you do not group or stack the report, Use one color is automatically selected. In this case, select a single, predefined system color. If you group or stack the report, select one of the following options:
For more information about the differences between these options, see Predefined colors in reports. | |
| Set color | Color used in the report. This field displays when you select Use one color from the Chart color list. Click the search icon ( Image omitted: SearchIcon.png Set paletteSearch icon) to choose from the <strong>Color Definitions</strong> list.</td></tr><tr><td> | Color palette used in the report. This field appears when you select Use color palette from the Chart color list. The palettes are defined in the Chart Color Scheme [pa_chart_color_schemes] table. |
| Colors | Colors used in the report. This field displays when you select Use several colors from the Chart color list. Enter a comma-separated list of hexadecimal color codes. These colors are independent of the predefined system colors that color palettes and the chart colors use.Note: It is not possible to use transparency hex values. | |
| Display data labels | Select to display the current value for each bar. This field is available when you select None from the Stacked by list or if there is no Stacked by list.- Select Data labels in the middle to show the labels in the middle of each bar. - Select Allow data labels to overlap to override default separation of labels in the visualization. | |
| Custom chart size | Enable the option to specify the width and height of the report in pixels.Note: The chart size is ignored when you export the report to PDF. In PDFs, the full page width is used to show the chart. | |
| Chart width | Width of the report in pixels. The default value is 600. This field is available when Custom chart size is selected. | |
| Chart height | Height of the report in pixels. The default value is 450.This field appears when Custom chart size is selected. | |
| Chart size | Chart size. This field is available when Custom chart size is cleared. Options are Small, Medium, and Large.Note: The chart size is ignored when you export the report to PDF. In PDFs, the full page width is used to show the chart. | |
| Drilldown view | List view to show when a user selects a segment of a report for which no drilldown report type is specified. This view is also used when the user reaches the lowest drilldown level of a report. See Configure the list layout . If you specify a Report drilldown, Drilldown view is ignored.For more information, see Define a report drilldown. | |
| Decimal precision | Number of decimal places to show. You can show from zero to four decimal places. Default value: 2. To change the default value, create the system property glide.chart.decimal.precision and specify the value. Note: Percentage labels do not change accordingly with the decimal precision specified. Image omitted: DecimalPrecision-BarReport.png TitleDecimal precision - Bar report [Omitted image "DecimalPrecision-DonutReport.png"] Alt text: Decimal precision - Donut report</p></td></tr><tr><td class="sub-head" colspan="2"> | |
| Show chart title | When the chart title is shown for the report.- Never: Never show the chart title. - Report only: Shows the chart title on reports. - Always: Shows the chart title on reports, dashboards, and landing pages. | |
| Chart title | The chart title has a maximum length of 40 characters. If no title is entered, the report name is used for the title. This field appears when Report only or Always is selected from the Show chart title list. | |
| Size of the chart title | Size of the chart title in pixels. This field appears when Report only or Always is selected from the Show chart title list. | |
| Chart title color | Color of the chart title. This field appears when Report only or Always is selected from the Show chart title list. | |
| Custom chart title position | Check box to specify X and Y coordinates for the position of the chart title. This field appears when Report only or Always is selected from the Show chart title list. | |
| Chart title X position | Number of pixels to adjust the chart title position right or left. By default the title appears at the center top of the chart. To move the chart title to the right, enter a positive value. To move the title to the left, enter a negative value.This field appears only when Custom chart title position is selected. | |
| Chart title Y position | Number of pixels to adjust the chart title position up or down. By default the title appears at the center top of the chart. To move up the chart title, enter a positive value. To move the chart title down, enter a negative value.This field appears only when Custom chart title position is selected. | |
| Title horizontal alignment | How the chart title is aligned horizontally. This field is available when the Custom chart title position option is cleared. | |
| Title vertical alignment | How the chart title is aligned vertically. This field appears when Custom chart title position is cleared. | |
| Legend | ||
| Show legend | Enable this option to show a chart legend. This check box appears when a Group by field is selected on the report form.Legends are truncated by default. To adjust truncation lengths, configure the properties glide.chart.label.legend.truncate_to and glide.chart.label.legend.truncate_to.large. For more information, see Reporting properties. | |
| Legend horizontal alignment | How the legend is aligned horizontally. This field appears when Show legend is selected. | |
| Legend vertical alignment | How the legend is aligned vertically. This field appears when Show legend is selected. | |
| Show legend border | Enable this option to show a border around the legend. This check box appears when Show legend is selected. | |
| Left align legend text | Enable this option to left-align the legend text when the report is viewed in a browser. By default, the legend text is centered. When the report is exported to PDF, PNG, or JPG, the legend remains centered. This check box appears when Show legend is selected. | |
| Axis | ||
| Y axis and X axis | Axis to configure the titles, appearance, and labels for. | |
| Title | Title for the axis. | |
| Title size | Size of the axis title in pixels. Default value is 12. | |
| Title bold | Enable this option to show the axis title in a bold typeface. | |
| Opposite | On the X axis tab, enable this option to show the X-axis title on the right side of the report instead. On the Y axis tab, enable this option to show the Y-axis title on top of the report instead of across the bottom. | |
| Display grid | On the X axis tab, enable this option to show horizontal grid lines on the report. On the Y axis tab, enable this option to show vertical grid lines on top the report. | |
| Grid dotted | Enable this option to show dotted grid lines instead of solid lines. | |
| From | Specify a minimum Y-axis value to limit the amount of information in the report. If you select an aggregation field that is not of the type Number, the From and To fields are not available.Note:
| |
| To | Specify a maximum Y-axis value to limit the amount of information in the report. If you select an aggregation field that is not of the type Number, the From and To fields are not available.Note:
| |
| X axis / Y axis label size | On the X axis tab, specify the size of the labels for the rows of the report. On the Y axis tab, specify the size of the labels for the columns in the report. | |
| Label bold | Enable this option to show the labels of the report in a bold typeface. | |