Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Converter year to quarter

Hi, Can any one please help me.

I have only the Year wise Data like

2012

2013

2014

But i need Quarter wise Data

Q1 DATA in 2012

Q2 DATA in 2012

Q3 DATA in 2012

Q4 DATA in 2012 like this how i can i get

Please help me

1 Solution

Accepted Solutions
kumarnatarajan
Partner - Specialist
Partner - Specialist

HI,

The below example will return all quarter in same value. because you don't have month wise data.

Create some dummy inline table with qear and quarter fields and link your data year field and dummy data year field.

Ex:

Quarter:

LOAD * INLINE [
Year, Quarter
2012, Q1
2012, Q2
2012, Q3
2012, Q4
]
;

View solution in original post

8 Replies
MK_QSL
MVP
MVP

If you don't have any Date dimension, this is not possible to get.

kumarnatarajan
Partner - Specialist
Partner - Specialist

HI,

The below example will return all quarter in same value. because you don't have month wise data.

Create some dummy inline table with qear and quarter fields and link your data year field and dummy data year field.

Ex:

Quarter:

LOAD * INLINE [
Year, Quarter
2012, Q1
2012, Q2
2012, Q3
2012, Q4
]
;

abhaysingh
Specialist II
Specialist II

u can use inline

e.g

load * inline

[S.No,Year,Quarter

     1,Jan,Q1,

     2,Feb,Q1,

     3,Mar,Q1,

     4,Apr,Q2,

     5,May,Q2,

     6,Jun,Q2,

     7,July,Q3,

     8,Aug,Q3,

     9,Sep,Q3,

     10,Oct,Q4,

     11,Nov,Q4,

     12,Dec,Q4

];

and for Quarter 2012 use it as  always selected value

fabio_vallone
Creator
Creator

If you have Date field, try this (on script):

CEIL(MONTH(Date)/4) AS Quarter

Not applicable
Author

Hi,

try this:

'Q'&' '&Ceil((IF(NUM(Month(DATE))>9,NUM(Month(DATE))-9,NUM(Month(DATE))+3))/3) AS [ Quarter];

hope it helps you.

Regards,

Divya

sundarakumar
Specialist II
Specialist II

If you have only data year wise then u cannot show it quarter wise, you can create any inline table to sepecifu quarters, but u dont have data to decide whiche quarter it belongs to.

So it is never possible to show quarter wise datawith onlu year field,

or you can split the whole year data into four equar parts to show it in quarters,

but it would be unmeaningful.

-Sundar

Not applicable
Author

Thank You So much to All.

MK_QSL
MVP
MVP

If you got your answer, please close the thread by Selecting Correct - Helpful answer