Time Series Pivot Table to Summarize Data

Origin 2025 introduces the Time Series Pivot table to summarize time series data both column and row-wise to better analyze data and find patterns. The tool can be found under the Restructure menu and Statistics-> Time Series menu.

This blog explains the controls in the tool with several examples. Please download the TimeSeriesPivot_Blog.zip file, unzip it to a folder and open the TimeSeriesPivotTable.opju file to follow along.

Basic Explanation

Right now the tool only analyzes one dataset at a time and there must a date column in the worksheet to start.  Most of the time when you import time series data into Origin, the date column will be set accordingly. If not, please double click the date column to set the format as Date.

There is Aggregation Interval and Time Period for both row and column direction.

  • Aggregation Interval defines the increment of date/time, from decades, year, quarter, month, week, day, hour to minute. For rows, it can even be customized to 2 year, 12 hour, 5 min, etc.
  • Time Period defines the period window of all rows or columns in output. 

Summarize Data Row-wise Only

Open the opju file. Go to 1. monthly mean temperature per decade folder in Project Explorer to try this.

Click on Restructure > Time Series Pivot to open the Time Series Pivot tool. Under Rows, select the following options: Aggregation Interval: Month, Time Period: <none>, Aggregate by: Mean to get monthly mean on each row. Since there is no Time Period, each month of different years will be a separate row. 

If you need to make changes to the output, click the green locks in the output sheet and choose Change Parameters… to modify settings. Note: hotkey Ctrl+F10 or Ctrl+single click is added in Origin 2025 to directly open the parameters dialog.

Under Rows, change the Time Period to Year.  Now, the same month of different years will be summarized together so only 12 rows in output.

There are also a lot of statistics quantities to aggregate by, from basic counts, sum, mean, to RMS, confidence interval, etc. Press Ctrl+F10 to open the dialog again. Set Aggregation by to Custom, and clicking on the > button next to Custom to add many quantities in output. Certain quantities e.g. SD and SE are set as YErr column so that you can directly plot them as error bars.

Summarize Data Both Column and Row-wise

Origin supports summarizing data both row-wise and column-wise.

Logan Airport’s Winter Month Temperature Change over Decades

Highlight Column B in Book1 again and choose Restructure: Time Series Pivot… . This time, under Rows, select Aggregation Interval: 10 yr: Decade, and under Columns, set Aggregation Interval: Month. Time Period: Year. Start: Dec and End: Feb. 

Tips:

  • Although the Time Series Pivot Table doesn’t output the Row and Column’s total mean, etc. it can be easily added to the output by highlighting columns B, C and D and clicking Statistics on Rows toolbar button and choose Quantities to output. They will be put to new column(s) to the right. Click any column label row header e.g. method and click the Insert > User Parameters mini toolbar button. Set Formula to Mean to get a user-defined row Mean with mean of each column.
  • Even though Origin only supports analyzing one data at a time, you can select another data, e.g. Column C and open the Time Series Pivot dialog again. Click > button next to Dialog Theme on the top of the dialog to load <last used> theme. Then set the Output to be the existing sheet e.g. [book6]wtspivot to place them together.

Overnight Sleep Data Analysis and Heatmap

Open the opju file. Go to 2. every night’s sleep status per week folder in Project Explorer to try this.

For sleep studies,  data is typically collected from night to next day. Set Rows Aggregation Interval: Hour, Time Period: Day, specify the Start hour in the evening and End hour the next day (Start is bigger than End) and set Columns Aggregation Interval: Week. Uncheck Remove Empty checkbox under Rows to make every hour show even if there is no data. Since Show Zero when Empty is checked as well so that those empty cells will show as 0.

Then highlight all data in output to create a heatmap.

Hold the Ctrl key and click on green lock on graph to open the dialog. change Rows Aggregation Interval: 2Hour to summarize data by every 2 hours. Heatmap will be auto updated.

Note: double-click heatmap plot. On Colormap tab of Plot Details dialog, make sure Rescale Mode is set to Auto so that when the wtsPivot sheet is updated, the colormap in heatmap will be auto updated.

Summarize Data by Fiscal Year

Open the opju file. Go to 3. quarterly tardiness total per school year folder in Project Explorer to try this.

Sometimes the row time period is set to Year or Week, etc. but it doesn’t start from the traditional start of the year or week. E.g. government fiscal year starts from Oct. 1st and ends on Sep. 30th next year; school year starts from Sep and ends in Jun. Or measurements starts from Thursday to Wednesday for several weeks.

For all such cases, the Rows Start Value is bigger than End value and the Column’s Aggregation Interval is same as the Rows Time Period. A checkbox named Follow Rows Start will appear under Columns node and should be checked for such scenarios. If unchecked, all data of same calendar year/week will instead be put in one column.

Summarize Quarterly Tardiness of School Year
Daily Blood Test Of Each Week

Open the opju file. Go to 4. daily blood pressure Log for several weeks folder in Project Explorer to try this.

Some blood test start in the middle of the week. For example, a patient is checked in on Thursday and takes measurements twice a day for 4 weeks. To summarize daily blood pressure average of each week (Thursday to Wednesday), set Rows Aggregation Interval: Day and Time Period: Week. Set Start: 4 and End: 3. Set Columns Aggregation Interval: Week so that each week will be a column in output. 

 !!!Check Follow Rows Start checkbox so that this week’s Thu, Fri, Sat. and next week’s Sun., Mon. Tue and Wed. will be in one column.

Hope this blog helps you get started with this feature. Any suggestions, please feel free to comment.

One Comment on “Time Series Pivot Table to Summarize Data”

Leave a Reply

Your email address will not be published. Required fields are marked *