cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
AdamChoen
Level III

summarize mean data by group and only last number of data point

hi,

I want to get the mean value of my "raw data" by a group of 3 different columns ("test name", "measurement name" and "entity") - this i can do by the summary option.

my problem is that I want only the last 13 points minimum (or last than 13 :) ) by date. 

those are my columns 

 

image.png

thanks for any help 

Thanks, Adam
1 REPLY 1

Re: summarize mean data by group and only last number of data point

You might want to check out the Statistical > Col Mean() formula. Create a new column with a formula ColMean(Raw_Value, test_name, measurement_name, entity). This will give the same means as the summary option but repeated across all rows.

If you order your table by date (decending), along with the other options you can create a formula which increments a counter and stops if the previous row and current row have different entity labels, etc.

You could then create a new column which copies the Raw_Value only if the counter is in the range 1-13. If you alter your first formula to point at this column, it will only take the means of these 13 or fewer values by entity.