2.2.4.2 Wtspivot


Brief Information

Aggregate data based on a date-time column

Additional Information

Minimum Origin Version Required: Origin 2024

Command Line Usage

1. wtspivot -r 1 time:=[Book1]Sheet1!A data:=[Book1]Sheet1!A rows:=dayofmonth cols:=month method:=max;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Source Time time

Input

Range

<unassigned>
Specify the range that will be used as the time source of the Pivot Table.
Source Data data

Input

Range

<unassigned>
Specify the range of data values to be summarized.
Time Bucket for Rows rows

Input

int

<unassigned>
Determine the time bucket shown in first column of the Pivot Table.

Option list:

0 year:Year 1 quarteryear:Quarter of Year 2 month:Month
3 weekofyear:Week of Year 4 dayofyear:Day of Year 5 dayofmonth:Day of Month
6 weekday:Weekday 7 hour:Hour of Day 8 halfhour:Halfhour of Day
9 quarterhour:Quarter Hour of Day 10 minute:Minute
Time Period for Columns cols

Input

int

0
Determine the time period shown in column label row of the Pivot Table.

Option list:

0 none:None 1 year:Year 2 quarteryear:Quarter of Year
3 month:Month 4 weekofyear:Week of Year 5 dayofyear:Day of Year
6 dayofmonth:Day of Month 7 weekday:Weekday 8 hour:Hour of Day
9 halfhour:Halfhour of Day 10 quarterhour:Quarter Hour of Day 11 minute:Minute
Secondary Time Period for Columns cols2

Input

int

0
Determine the secondary time period shown in column label row of the Pivot Table.

Option list:

0 none:None 1 year:Year 2 quarteryear:Quarter of Year
3 month:Month 4 weekofyear:Week of Year 5 dayofyear:Day of Year
6 dayofmonth:Day of Month 7 weekday:Weekday 8 hour:Hour of Day
9 halfhour:Halfhour of Day 10 quarterhour:Quarter Hour of Day 11 minute:Minute
Limit Columns to Range limitcol

Input

int

1
Check this checkbox to limit the output Date-and-Time columns to the input Date-and-Time range. Otherwise, output Date-and-Time columns will round to the ends of time period you specified.
Show Zeros when Empty zero

Input

int

1
Specify whether to show missing values in the pivot table as zeros.
Aggregate by method

Input

int

0
Specify the way to summarize the Source Data.

Option list:

count:Count {0} Output the count of each Row/Column pair.
sum:Sum {1} Output the sum of each Row/Column pair.
mean:Mean {2} Output the mean of each Row/Column pair.
min:Min {3} Output the minimum value of each Row/Column pair.
max:Max {4} Output the maximum value of each Row/Column pair.
median:Median {5} Output the median value of each Row/Column pair.
sd:SD {6} Output the Standard Deviation of each Row/Column pair.
se:SE {7} Output the Standard Error of each Row/Column pair.
rms:RMS {8} Output the Root Mean Square of each Row/Column pair.
ci:Confidence Interval {9} Output the confidence interval for a population mean of each Row/Column pair (using a normal distribution).
range:Range (Max - Min) {10} Output the range between maximum and minimum of each Row/Column pair.
first:First in Subgroup {11} Output the first value in each Row/Column pair.
last:Last in Subgroup {12} Output the last value in each Row/Column pair.
custom:Custom {13} Select this option to define your own summarized method in Custom edit box below.
Custom custom

Input

String

mean sd
Available only when Aggregate by is set to Custom. Specify the summarized method in the combo edit box. The triangle button next to the edit box provides some frequently-used statistics quantities. You can mix them and construct your own summarized method.
Output Result Table to rd

Output

ReportData

[<input>]<new>
Specify where to output result table.

Description

This X-Function allows you to create a pivot table to visualize data summarization (of statistics) based on a date-time column

Examples