Restructure: Time Series Pivot...
Aggregate data based on a date-time column
Minimum Origin Version Required: Origin 2024
1. wtspivot -r 2 time:=[Book1]Sheet1!A"DATE" data:=[Book1]Sheet1!B"PRCP" rowsBucket:="3 Month: Quarter" rowsPeriod:=Year colsBucket:=Month;
2. wtspivot -r 2 time:=[Book10]Sheet1!A data:=[Book10]Sheet1!B rowsBucket:=Month rowsPeriod:=Year rowsStart:=Apr rowsEnd:=Jun colsBucket:=Week colsPeriod:=Month colsStart:=6 colsEnd:=7 method:=custom custom:="sum max";
Please refer to the page for additional option switches when accessing the x-function from script
| Display Name |
Variable Name |
I/O and Type |
Default Value |
Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Source Time | time |
Input Range |
|
Specify the range that will be used as the time source of the Pivot Table. | ||||||||||||||||||||||||||||
| Source Data | data |
Input Range |
|
Specify the range of data values to be summarized. | ||||||||||||||||||||||||||||
| Aggregation Interval | rowsBucket |
Input string |
|
Specify the aggregation interval of time in the rows of the pivot table. This time interval is shown in first column of the pivot table.
Option list:
| ||||||||||||||||||||||||||||
| Time Period | rowsPeriod |
Input string |
|
Specify the time group of the aggregation interval. According to the selected Aggregation Interval, you can specify the corresponding time period. | ||||||||||||||||||||||||||||
| Remove Empty | rowsRemoveEmpty |
Input int |
|
Specify whether to remove the empty rows.
Option list:
| ||||||||||||||||||||||||||||
| Start | rowsStart |
Input string |
|
Enter the start time of the rows of the pivot table.
The time format of the Start is based on the specified Aggregation Interval. | ||||||||||||||||||||||||||||
| End | rowsEnd |
Input string |
|
Enter the end time of the rows of the pivot table.
The time format of the End is based on the specified Aggregation Interval. | ||||||||||||||||||||||||||||
| Custom Format | rowsCustomFmt |
Input string |
|
Custom the time format showing in the first column | ||||||||||||||||||||||||||||
| Aggregation Interval | colsBucket |
Input string |
|
Specify the aggregation interval of time in the columns of the pivot table. This time interval is shown in Comment label row of the pivot table.
Option list:
| ||||||||||||||||||||||||||||
| Time Period | colsPeriod |
Input string |
|
Specify the time group of the aggregation interval. According to the selected Aggregation Interval, you can specify the corresponding time period. | ||||||||||||||||||||||||||||
| Remove Empty | rowsRemoveEmpty |
Input int |
|
Specify whether to remove the empty columns.
Option list:
| ||||||||||||||||||||||||||||
| Share Rows Start/End | share |
Input int |
|
Specify whether to share rows Start or End to the columns | ||||||||||||||||||||||||||||
| Start | colsStart |
Input string |
|
Enter the start time of the columns of the pivot table.
The time format of the Start is based on the specified Aggregation Interval. | ||||||||||||||||||||||||||||
| End | colsEnd |
Input string |
|
Enter the end time of the columns of the pivot table.
The time format of the End is based on the specified Aggregation Interval. | ||||||||||||||||||||||||||||
| Custom Format | colsCustomFmt |
Input string |
|
Custom the time format showing in the Comment label row. | ||||||||||||||||||||||||||||
| Aggregate by | method |
Input int |
|
Specify the way to summarize the Source Data.
Option list:
| ||||||||||||||||||||||||||||
| Custom | custom |
Input String |
|
Available only when Aggregate by is set to Custom. You can mix them and construct your own summarized method. | ||||||||||||||||||||||||||||
| Show Zeros when Empty | zeros |
Input int |
|
Specify whether to show missing values in the pivot table as zeros.
Option list:
| ||||||||||||||||||||||||||||
| ReportData | rd |
Output ReportData |
|
Specify where to output result table. |
This X-Function allows you to create a pivot table to visualize data summarization (of statistics) based on a date-time column