QPR ProcessAnalyzer Pivot Table: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
Line 17: Line 17:


==Conditional Formatting==
==Conditional Formatting==
Pivot table has the same [[QPR_ProcessAnalyzer_Table#Conditional_formatting|conditional formatting]] options as the table. Conditional formatting allows to set pivot table values cells background colors and text color based on the shown values to improve visualization. It's also possible to show a databar and icon in the values cells.
Pivot table has the same [[QPR_ProcessAnalyzer_Table#Conditional_formatting|conditional formatting]] options as the table. Conditional formatting allows to set pivot table value cells background color and text color based on the shown values to improve the illustration. It's also possible to show a databar and icon in the value cells.


==Customization Examples==
==Customization Examples==

Revision as of 23:00, 1 December 2022

Pivot table visualizes data organized as dynamical rows and columns and aggregated numerical values. Compared to the table, rows in the pivot table work similarly, but in the pivot table the number of columns is determined dynamically based on the data. It's also possible set several dimensions as rows and columns to create hierarchical visualization.

Pivot Table Functionalities

Pivot table has the following functionalities:

  • Pivot table can show several measures (i.e., values) in the same table by defining several measures, dimensions or columns and mapping them the to the Values (Mapping to visualization in the measure, dimension or column settings). By default, the measure expressions are shown as the pivot table values.
  • There can be several measures, dimensions or columns mapped to the pivot table Rows. When there are more than one mapped, they are shown as a hierarchical structure. By default, the first dimension expression is shown in rows.
  • Pivot table columns work similarly as the rows, so there can be several measures, dimensions or columns mapped to the pivot table Columns. By default, the second dimension is shown as columns.
  • When rows or columns show the hierarchy, the branches in the hierarchy can be expanded and collapsed. By default, branches are collapsed, but they can be set as expanded on open by using the Layout settings.
  • Values are aggregated using the Pivot table aggregation setting in the measure, dimension and column settings. All aggregations can be used with the numerical measures, dimensions and columns, and also the Count and Distinct count can be used with any type of measures, dimensions and columns.
  • Rows and columns are sorted based on the Sorting settings (in the General tab). If needed, use the custom sorting to get the desired sorting.
  • Data can also be sorted by a certain value column by clicking the column header. Sorting by values can also be stored to the dashboard, so that the values sorting is applied when the dashboard is opened. This is done by using the Custom layout settings (see the examples below for values sorting).
  • Appearance of the shown data points in rows, columns and values can be changed in the measure, dimension and column settings by using settings Round to decimals, Unit, Unit position and Date format.
  • Title for the pivot table can be set in the General tab.
  • Columns can be resized by dragging the border between column headers. The changed widths are not stored to the dashboard.
  • Pivot table can be exported as Excel, pdf and csv (open settings, General tab and Export as...).
  • For advanced needs, the pivot table settings can be customized by using the Custom layout settings. Available options are described in https://ej2.syncfusion.com/documentation/pivotview/.

Conditional Formatting

Pivot table has the same conditional formatting options as the table. Conditional formatting allows to set pivot table value cells background color and text color based on the shown values to improve the illustration. It's also possible to show a databar and icon in the value cells.

Customization Examples

Hide Grand Totals

Grand totals can be hidden, and there are following settings separately for rows and columns:

{
  "dataSourceSettings": {
    "showColumnGrandTotals": false,
    "showRowGrandTotals": false
  }
}

Sort Rows by Measure Values

It's possible to sort the pivot table rows using values in a certain column (New York in the example below) as follows:

{
  "dataSourceSettings": {
    "valueSortSettings": {
      "headerText": "New York",
      "sortOrder": "Ascending"
    }
  }
}

The above example works, if there is one value column. If there are several values, the value used for sorting need to be specified (Case count in the example below)in addition to the column name as follows:

{
  "dataSourceSettings": {
    "valueSortSettings": {
      "headerText": "New York#Case count",
      "sortOrder": "Descending",
      "headerDelimiter": "#"
    }
  }
}

Sort Columns by Measure Values

It's possible to sort the pivot table columns based on the values. The principle is the same as with sorting the rows except valueAxis setting needs to be set to rows:

{
  "dataSourceSettings": {
    "valueAxis": "row",
    "valueSortSettings": {
      "headerText": "New York",
      "sortOrder": "Descending"
    }
  }
}

This example sorts columns based on the Grand Total:

{
  "dataSourceSettings": {
    "valueAxis": "row",
    "valueSortSettings": {
      "headerText": "Grand Total",
      "sortOrder": "Descending"
    }
  }
}

Expand Hierarchy

By default, the second level in the rows or columns hierarchy is collapsed. Use this setting to expand the hierarchies by default:

{
  "dataSourceSettings": {
    "expandAll": true
  }
}