Pivot tables

  • Rversion finale: Australia
  • Mis à jour 12 mars 2026
  • 6 minutes de lecture
  • Pivot tables aggregate data from a table into columns and rows, which you define. They help you quickly investigate the source of the summarized data. Non-empty cells display tooltips to indicate how many records the cell represents. Click a non-empty cell to display a breakdown of those records.

    You can configure a filter to refine the data further and select the aggregation values.

    Remarque :
    While the pivot table report is still available, no enhancements are planned for this report and limitations are not being fixed. For new reports and older reports with problems, use the multilevel pivot table report. The multilevel pivot table is more stable, has more features than the pivot table, and is being continuously maintained. For more information, see Multilevel pivot table.
    Figure 1. Pivot table
    pivot table example

    Create a pivot table

    Create a pivot table to aggregate data from a table into columns and rows. Tooltips indicate what the values represent.

    Avant de commencer

    Role required: report_admin

    Pourquoi et quand exécuter cette tâche

    Procédure

    1. Navigate to sys_reports.list and select New.
    2. On instances with Unified Analytics enabled, and on new Australia instances, both Core UI reports and Platform Analytics experience data visualizations are found in the Platform Analytics library. Navigate to All > Platform Analytics > Library > Data Visualizations and select New. For more information, see Differences between Core UI and Platform Analytics dashboards.
    3. On the Data tab, give the report a name that reflects the information being grouped.
    4. Select the applicable source for the report.
      OptionDescription
      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.
      Remarque :
      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 (Upload icon) to import a new file. See Create a Core UI report from an imported Microsoft Excel document.
      MetricBase MetricBase enables you to collect, retain, analyze, and visualize custom time series data on the ServiceNow AI Platform. For more information, see MetricBase.
    5. Select Next.
    6. On the Type tab, enter Pivot in the filter, select the Pivot 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.

    7. On the Configure tab, fill in the following fields and select Next.
      Tableau 1. Configure tab
      Field Description
      Row Select one field for the chart rows. The chart displays data broken down by a combination of row and column values. To select a source field on extended table, see How to report on extended tables. Select the info icon for a description of the selected field.
      Column Select one field for the chart columns. The chart displays data broken down by a combination of row and column values. To select a source field on an extended table, see How to report on extended tables. Select the info icon for a description of the selected 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.

      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.

      Max number of groups Maximum number of groups that the Group by condition returns. 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, all groups up to a limit of 50 are displayed. The rest of the results 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.
    8. Facultatif : 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).

        Remarque :
        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 ( 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
    9. Facultatif : 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.
      Remarque :
      In aggregated and list reports, language-dependent filter conditions may return zero results on localized instances.
    10. On the Style tab, fill in the fields as appropriate to configure the appearance of the report.
    11. Select Save to continue editing the visualization, or Save and close to return to the Analytics Overview main screen.

    Que faire ensuite

    • 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.
    • Search the Community site for more insight or help with pivot reports.
    Remarque :
    While the Import Export property glide.pdf.max_rows applies to row limits for pdf data exports in the platform product, for pivot reports exported to pdf from the Reporting product, it sets the maximum number of total cells (both rows and columns).

    Pivot report style options

    Change the look of your pivot 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.

    Tableau 2. Pivot report style options
    Field Description
    General
    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.