cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
john_madden
Level VI

Time as a grouping variable: column format-sensitive?

I want statistics (e.g. median, mean, etc.) on my data by various time intervals: day, week, month, year, etc. Two niggly questions:

 

If I have a single time column, is the interval used for grouping sensitive to the column format? i.e. if the format to "m/y", does it group by months? If I then change the column format to "m/d/y", does it now group by days?

 

If not, then I can certainly use the Day of Year() and Week of Year() functions. But of course these reset to 1 at the beginning of each new year, and my data spans multiple years. I've fiddled around with various solutions, but none of them are as elegant as I'd like. What have you found to be the cleanest way of grouping multi-year data by weeks, months, quarters and years?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Time as a grouping variable: column format-sensitive?

I usually just get the most granular time unit I can get my hands on. From there if you right click on the column header for your time stamp and look under Formula Columns, you'll find lots of different granularities that JMP will create for you. Using that will let you adjust as you like without changing the original column.

M

View solution in original post

6 REPLIES 6
john_madden
Level VI

Re: Time as a grouping variable: column format-sensitive?

PS when I say "does it group", I mean do summaries and graphs use the format-specified interval as a grouping variable when so instructed (group by, etc.)

Re: Time as a grouping variable: column format-sensitive?

I usually just get the most granular time unit I can get my hands on. From there if you right click on the column header for your time stamp and look under Formula Columns, you'll find lots of different granularities that JMP will create for you. Using that will let you adjust as you like without changing the original column.

M
john_madden
Level VI

Re: Time as a grouping variable: column format-sensitive?

So you're saying, create a new column for each time unit you want to group by?

Re: Time as a grouping variable: column format-sensitive?

Depends on the situation - but, to your other point, if you have a column of daily data (e.g. - m/d/y) you can control the nesting properties for the display of the month, day, and year using the axis properties. Have a look at the time axes in this blog post - they were all done using the axis properties in GB, not nesting columns: https://community.jmp.com/t5/JMPer-Cable/The-economics-of-snow-plow-services/ba-p/48507
john_madden
Level VI

Re: Time as a grouping variable: column format-sensitive?

Oh gosh, now I see what you mean. I didn't even know that was there!!!
john_madden
Level VI

Re: Time as a grouping variable: column format-sensitive?

PPS, and when I say "cleanest", I mean for purposes of displaying as the x-axis of a graph. I need time to be a continuous variable, and evidently graph builder only allows nesting of categorical axes, not continuous ones…