
Contents |
Pivot Table
Create a pivot table to visualize data summarization
Minimum Origin Version Required: 8.1 SR0
wpivot row:=col(4) col:=col(6) data:=col(11) method:=sum total:=1 sort_total:=descend sum:=1;
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Pivot Table Row Source | row |
Input Range | | Specify the range that will be used as the row source of the Pivot Table. Every distinct value of the selected range will correspond to a row in the pivot table. For example, if the table row source contains 5 cells and the values are "East", "South", "West", "South" and "East", there will be 3 rows in the pivot table. |
| Pivot Table Column Source | col |
Input Range | | Specify the range that will be used as the column source of the Pivot Table. Every distinct value of the selected range will correspond to a column in the pivot table. |
| Pivot Table Data Source | data |
Input Range | | This is available only when Count is not selected for Summarize by (the Method variable). It provides the data values to be summarized. |
| Summarize by | method |
Input int | | Specify the way to summarize the data.
Option list:
|
| Combine Direction | dir |
Input int | | With this drop-down list, you can choose whether to combine the count/sum/mean/min/max for smaller values into an "others" column/row.
|
| Mode | vmode |
Input int | | Specify the mode for qualifying smaller values.
|
| Reference Row/Col | threshold |
Input double | | Specify the reference row/column when either By Percent of Reference Row/Column or Top N of Reference Row/Column is selected for Mode. |
| Threshold | label |
Input string | | Specify the percent for qualifying the smaller values when either By Percent of Grand Total or By Percent of Reference Row/Column is selected for Mode |
| Value Label | total |
Input int | | Specify the label for the column/row which is formed by merging the smaller value columns/rows. |
| Totals for Rows | sort_total |
Input int | | Specify whether to add a Row Total column. Each cell in this column contains the sum of the data in the same row. |
| Sort Output Rows | sum |
Input int | | Specify the method used to sort the rows in the pivot table by the Row Total column.
Option list:
|
| Totals for Columns | sort_col |
Input int | | Specify whether to add a Column Total row. Each cell in this row contains the sum of the data in the same column. |
| Sort Output Columns | normalize |
Input int | | Specify the way to sort the output rows.
Option list:
|
| Normalize by Column Totals | zero |
Input int | | Specify whether to normalize the output data by the Column Totals.
Option list:
|
| Show Zeros when Empty | exrow |
Input string | | Specify whether to show missing values in the pivot table as zeros. |
| Row Source Extra Values | excol |
Input string | | Specify additional values for row source. |
| Column Source Extra Values | rd |
Output ReportData | | Specify additional values for column source.
|
This X-Function allows you to select two columns to create a pivot table to visualize data summarization, which is a easy way to present information.
A supermarket supplies different brands of products which are produced by different makes. The manager wants to know the number of products in shelf for different brands and different makes.
If the manager is only interested in the Brands which have large number of products in the shelf, then we need to use the Combine feature of Pivot table to combine smaller values of the result table above. In the following example, we only keep the brands columns in the result table above if their column total values are bigger than 10% percent of the Grand Total value.