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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to create quarter on Month object

Hello Everyone,

Any body please tell me is it possible to create Quarter object based on the month, i do not have date object with me

Thanks in advance

1 Solution

Accepted Solutions
DavidFoster1
Specialist
Specialist

If you have the month number then a simple function will work nicely.

Months:

LOAD

  *,

  'Q' & CEIL(TESTMONTH/3) AS TESTQTR;

LOAD * INLINE [

TESTMONTH

1

2

3

4

5

6

7

8

9

10

11

12

];

View solution in original post

3 Replies
agomes1971
Specialist II
Specialist II

if(month<=3,'Quarter1',if(month>3 and month<=6;'Quarter 2';if(month>6 and month<10;'Quarter 3','Quarter 4')))

something like this...

Not applicable
Author

You can hard code this by this

If(match(Month,'Jan','Feb','Mar'),'Q1',If(match(Month,'Apr','May','Jun'),'Q2',if(match(Month,'Jul','Aug','Sep'),'Q3','Q4')))

hope above code will help you

regards

bhawna

DavidFoster1
Specialist
Specialist

If you have the month number then a simple function will work nicely.

Months:

LOAD

  *,

  'Q' & CEIL(TESTMONTH/3) AS TESTQTR;

LOAD * INLINE [

TESTMONTH

1

2

3

4

5

6

7

8

9

10

11

12

];