cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
jearls11
Level III

Seperating year by Quarters

I am trying to seperate the year by quarters using dates. I was looking at documentation and it gave the extract function.

EXTRACT( datepart, datetime, )

I am not sure how quiet to use it, my idea is if data is between Jan 1st and March 28th its Q1 etc

I could use if (Jan1st <:Date< Jan1st + In Weeks( 13 ), "Q1",

                      Jan1st + In Weeks( 13 )+ In Days(1) <:Date< (Jan1st + In Weeks( 13 )+In Days(1)) + In Weeks(13), "Q2", etc...

 

is this too complicated.

 

 

3 REPLIES 3
txnelson
Super User

Re: Seperating year by Quarters

Try

floor( month(:date) / 3 ) +1;

See @ZF answer

Jim
ZF
ZF
Level III

Re: Seperating year by Quarters

Try this formula:

Quarter(:Date)

Georg
Level VII

Re: Seperating year by Quarters

Using JMP15, when looking for formulas it is always a good idea to try "New Formula Column" from the columns menu.

This often helps me to do the first step.

 

Georg_0-1616263508105.png

 

Georg