Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

DATE to financial quarter

I have a date field column

date format for this column is -

                                              01-07-2001

                                              26-09-2011

i want to convert it into financial quarter-

output like -Q2

                 Q3

1 Solution

Accepted Solutions
Not applicable
Author

Use this:

'Q'&If(Month(QuarterStart(Datefield))='1',4,Div(Month(QuarterStart(Datefield)),3))

Kiran.

View solution in original post

9 Replies
MayilVahanan

Hi,

     Try this,

     = 'Q' & Ceil(Month(Date) / 3)

     or

    

    = Dual('Q' & Ceil(Month(Date) / 3) & ' ' & Year(Date), QuarterName(Date))

     Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

no.

i want to make apr-june-   Q1

                      july-sep     Q2

like in this way

Anonymous
Not applicable
Author

quarter 4

Anonymous
Not applicable
Author

2012 apr-jun -Q1

.....

.....

2013 jan-mar-Q4

Not applicable
Author

Use this:

'Q'&If(Month(QuarterStart(Datefield))='1',4,Div(Month(QuarterStart(Datefield)),3))

Kiran.

MayilVahanan

Hi,

Its give

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

As Kiran said..

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Hi,

you are right . i am new here can you explain it littlebit if you don't mind.

Month(QuarterStart(OrderDate)) as mm,--jul

Div(Month(QuarterStart(OrderDate)),3) as no_mm,--02

If(Month(QuarterStart(OrderDate))='1',4,Div(Month(QuarterStart(OrderDate)),3))

i want to know how is it executing

regards

Not applicable
Author

QuarterStart would return month beginning for each quarter as in calendar like jan=1, apr =4 etc.. Used if else to change 1 to 4 and div to find the quotient while dividing with 3 for the rest.

Regards,

Kiran Rokkam.

Anonymous
Not applicable
Author

thanks