cancel
Showing results for 
Search instead for 
Did you mean: 

group by qtr

Former Member
0 Kudos

i am using the following to create a group by qtr.

if {NYP_pal_care_rpt;1.ADMIT_DATE} in Calendar1stQtr then 'QTR1' else

if {NYP_pal_care_rpt;1.ADMIT_DATE} in Calendar2ndQtr then 'QTR2' else

if {NYP_pal_care_rpt;1.ADMIT_DATE} in Calendar3rdQtr then 'QTR3' else

if {NYP_pal_care_rpt;1.ADMIT_DATE} in Calendar4thQtr then 'QTR4'

if the end user selects the previous year i would still like to create a group by qtr for the previous year.

i dont see anything just for qtr1 etc. anyone know how i can accomplish this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sharon,

There are two ways of doing this...

#1) Create a "year" group as group level 1 and make the "quarter" group at the 2nd level. (2 group level design)

#2) Do as Rody suggested and create a formula that concatenates the year with the quarter and group on that (single level design).

HTH,

Jason

Former Member
0 Kudos

if im not mistaken, the calendar1stqtr etc only pick up values in the current year.

i was actually wondering if there is a different function that allows me to pick up any year.

like

(calendar1stqtr-1) in the formula

Former Member
0 Kudos

Just use the DatePart function instead...


DatePart("q", {NYP_pal_care_rpt;1.ADMIT_DATE})

Former Member
0 Kudos

thanks guys, the year and the datepart function worked great. have a great sunshinny day!!!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I don't know if this is useful, but I did a similar report and just concatonated the year in front of the quarter. In the end it worked well for our purposes...