Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

hkg_qlik
Contributor III

Create Q1 - 2013 and Q1 - JAN from Date field

Hi all,

I have a date field in my Fact table. Now using the DATE I need to create Quarter - Year and Quarter - Month.

Can someone help me with the script?

Thanks,

H

Tags (2)
1 Solution

Accepted Solutions
mov
Esteemed Contributor III

Re: Create Q1 - 2013 and Q1 - JAN from Date field

Quarter Year:

='Q' & ceil(month(Date)/3) & ' - ' & year(Date)

Quarter Month:

='Q' & ceil(month(Date)/3) & ' - ' & date(Date, 'MMM')

3 Replies
mov
Esteemed Contributor III

Re: Create Q1 - 2013 and Q1 - JAN from Date field

Quarter Year:

='Q' & ceil(month(Date)/3) & ' - ' & year(Date)

Quarter Month:

='Q' & ceil(month(Date)/3) & ' - ' & date(Date, 'MMM')

jonasheisterkam
Contributor III

Re: Create Q1 - 2013 and Q1 - JAN from Date field

='Q'&ceil(Month('11.3.2014')/3)&'-'&year('11.3.2014') ='Q'&ceil(Month('11.3.2014')/3)&'-'&month('11.3.2014')

Re: Create Q1 - 2013 and Q1 - JAN from Date field

Hi

Looks like you may well need to be introduced to the concept of a Master Calendar.

Search this QlikCommunity for Master Calendar and you'll get plenty of hits.

Best Regards,     Bill