Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have a date column and want to extract quarter information from this. The date is is the YYYYMMDD format.
thanks
Try like:
Load
'Q' & Ceil(Month(Date#(YourDateField, 'YYYYMMDD'))/3) as Quarter
Create below line in your master calendar or below the Date field...
'Q'&Ceil(Month(Date#(YourDateField,'YYYYMMDD'))/3) as Quarter
Thanks, its working fine.
I have one more requirement. I want set Nov as my first month so that if I select Q1, I should see, Nov, Dec and Jan month information.
Regards,
Viresh
Its working fine, Thank You.
I have one more requirement. How to set Nov as my first month. So if i select Q1, i should see, Nov, Dec and Jan info.
Regards,
Viresh
Try this to create Quarter:
'Q'&Ceil(Num(Month(AddMonths(Date,-10)))/3) as [Fiscal Quarter]
It will give you the result:
Q1 - Nov, Dec, Jan
Q2 - Feb, Mar, Apr
Q3 - May, Jun, Jul
Q4 - Aug, Sep, Oct
See this Post:
http://community.qlik.com/thread/108327
Regards
Aviral Nag
Then you have to recalculate your month field preferably using preceding load like:
Load
'Q' & Ceil(fMonth/3) as Quarter;
Load
Mod(Month(Date#(YourDateField, 'YYYYMMDD')) -11, 12)+1 as fMonth,
From <>;
I tried this but in the Fmonth list box I am getting numbers from 1 to 12. Is it possible to show the month name instead of numbers?
Have you tried my logic posted above.
It will work.
See this:
Try this to create Quarter:
'Q'&Ceil(Num(Month(AddMonths(Date,-10)))/3) as [Fiscal Quarter]
It will give you the result:
Q1 - Nov, Dec, Jan
Q2 - Feb, Mar, Apr
Q3 - May, Jun, Jul
Q4 - Aug, Sep, Oct
See this Post:
http://community.qlik.com/thread/108327
Regards
Aviral Nag
I got it, its working fine.
thanks guys.