cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
nv11
Level II

Rolling Maximum Sum Over a finite Period

Hi, I have a dataset of about 500,000 rows, each date stamped by the minute. I am trying to find the maximum sum over a 15 minute, 1 hours and 4 hour period i.e.

 

Row 1-15 sum = e.g. 5000 (5000 would be the sum of rows 1-15)

Row 2-16

Rows 3-17 sum = e.g. 8000 (8000 would be the sum of rows 3-17)

.

.

.

 

Rows 10-25 sum = e.g. 7900 (7900 would be the sum of rows 10-25)

 

I would like the tabulation to return 8000. which is the max sum

 

Similar concept with 1hr (rolling sum of 60 rows) and 4hrs (sum of 240 rows)

4 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: Rolling Maximum Sum Over a finite Period

Try using Col Moving Average() * 15 to get the moving sum

Col Moving Average( yourcolumn, before=15, after=0) * 15;
Jim

View solution in original post

nv11
Level II

Re: Rolling Maximum Sum Over a finite Period

I am looking for a Column Rolling Sum (instead of average). Is that something that can be done?

View solution in original post

txnelson
Super User

Re: Rolling Maximum Sum Over a finite Period

The average multiplied by 15 will be the sum
Jim

View solution in original post

nv11
Level II

Re: Rolling Maximum Sum Over a finite Period

I realized the problem. the before needed to be 14 instead of 15 to include 15 items

Col Moving Average( yourcolumn, before=14, after=0) * 15;

 

View solution in original post

6 REPLIES 6
txnelson
Super User

Re: Rolling Maximum Sum Over a finite Period

Try using Col Moving Average() * 15 to get the moving sum

Col Moving Average( yourcolumn, before=15, after=0) * 15;
Jim
nv11
Level II

Re: Rolling Maximum Sum Over a finite Period

I am looking for a Column Rolling Sum (instead of average). Is that something that can be done?

txnelson
Super User

Re: Rolling Maximum Sum Over a finite Period

The average multiplied by 15 will be the sum
Jim
nv11
Level II

Re: Rolling Maximum Sum Over a finite Period

hi, thanks for the response but I can't seem to get the answer unfortunately. I tried pulling the data into excel to run some tests, but it doesn't give me the same answer especially because its returning some answers with decimals.

nv11
Level II

Re: Rolling Maximum Sum Over a finite Period

I realized the problem. the before needed to be 14 instead of 15 to include 15 items

Col Moving Average( yourcolumn, before=14, after=0) * 15;

 

txnelson
Super User

Re: Rolling Maximum Sum Over a finite Period

My error......I must have miss typed my response.......I intended to specify 14.

Jim

Recommended Articles