Hi chadyoder,
The following script asks for the last entry in the data table of the date column and creates a data filter for all 10 days before the last entered date. You can adjust it to any kind of date Format of course, but should help you for the next step. The data table looks like the following:
![7753_pastedImage_4.png 7753_pastedImage_4.png](https://community.jmp.com/t5/image/serverpage/image-id/1064iB1CF5F9E5AB2EE1A/image-size/medium?v=v2&px=400)
=====
dt = Current Data Table();
dt << Data Filter(
Location( {198, 198} ),
Mode( Show( 1 ), Include( 1 ) ),
Add Filter(
columns( :Date ),
Where( :Date >= (:Date[N Rows (Current Data Table())]-(60*60*24*10)) ),
Display( :Date )
)
);
Distribution(
Arrange in Rows( 4 ),
Continuous Distribution( Column( :Sunspots ), Count Axis( 1 ) ),
SendToReport(
Dispatch(
{"Distributions", "Measurement"},
"Distrib Histogram",
FrameBox,
{DispatchSeg( Hist Seg( 1 ), Histogram Color( 42 ) )}
)
)
);
=====
The (60*60*24*10) stands for 60 seconds times 60 minutes times 24 hours times 10 days, so including the last row date you select 11 last rows of Date column.
The result looks like:
![7754_pastedImage_0.png 7754_pastedImage_0.png](https://community.jmp.com/t5/image/serverpage/image-id/1065iBCA809122D79F105/image-size/medium?v=v2&px=400)
Hope that helps, Martin
/****NeverStopLearning****/