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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

quarters for the year

I would like to break quarters into the quarters for a certain year.  For example:  Q1 2015, Q2 2015, Q3 2015

How is that done?

ShareRates:

LOAD
year([Month_datefield/ShareRates])as calendaryearonly,
*;

LOAD

if(match(date(datefield, 'MMM'),'Jan','Feb','Mar') > 0, 'Q1',
if(match(date(datefield,'MMM'),'Apr','May','Jun') > 0, 'Q2',
if(match(date(datefield,'MMM'),'Jul','Aug','Sep') > 0, 'Q3',
if(match(date(datefield, 'MMM'),'Oct','Nov','Dec') > 0, 'Q4')))) as Sharedratesquarter_group,
date(datefield,'MMM-YYYY')as [Month_datefield/ShareRates]

Labels (1)
3 Replies
sunny_talwar
MVP
MVP

May be this:

LOAD
year([Month_datefield/ShareRates])as calendaryearonly,
*;
LOAD
'Q' & Ceil(Month(datefield)/3) as Sharedratesquarter_group,
date(datefield,'MMM-YYYY')as [Month_datefield/ShareRates]
,

Not applicable
Author

thank you

sunny_talwar
MVP
MVP

Did it work? If it did, would you mind closing the thread down by marking the correct answer above? If not, would you be able to elaborate what is the issue still?

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny