Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
darrellbutler
Creator
Creator

Quarter Name for 4 4 5 Financial calendar

Hi,

I'm looking to add a finacial quarter description to my master calendar. For example fin yr 2014 starts on the 31/03/2013, I would like to add Q1 to this but most of the shifts in the quarter functions only take you to first day of each month.

For example Quartername('31/03/2013' , 4) gives a description of Jan - Mar 2013, when really I want it to be Apr - Jun 2013.

I could create my own inline view and use intervalmatch but was wondering if there is Qlikview syntax that can handle this ?

Many thanks

2 Replies
MayilVahanan

HI

Try like this

Load *,

'Q'&If(Month(QuarterStart(Date))='1',4,Div(Month(QuarterStart(Date)),3)) as Quarter

from tablename;

Q1->apr,may,jun

Q2->jul,aug,sep

..

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
CELAMBARASAN
Partner - Champion
Partner - Champion

You can use as

=Quartername(Date#('01/04/2013','DD/MM/YYYY') , 0,4)

From help

QuarterName(date [, shift = 0 [, first_month_of_year = 1]])

Returns a display value showing the months of the quarter (formatted according to the MonthNames script variable) and year with an underlying numeric value corresponding to a timestamp with the first millisecond of the first date of the quarter. Shift is an integer, where the value 0 indicates the quarter which contains date. Negative values in shift indicate preceding quarters and positive values indicate succeeding quarters. If you want to work with (fiscal) years not starting in January, indicate a value between 2 and 12 in first_month_of_year.