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

Quarters

How derive the quarters,months using this filed

and

but my requirement is derive physical quarters and every quarter have 13 weeks of data but I want

showing like  Q1-1,2,3.......13

Q2  also like--1,2,3,4,5,........13

every quarter comes like this way

2 Replies
techvarun
Specialist II
Specialist II

Check the attached.

sample.PNG

el_aprendiz111
Specialist
Specialist

Hi

Expression: 'Q 0' & Ceil(Right(ShipMonth,2)/3)


option 2

tbl:
LOAD *, 'Q 0' & Ceil(Right(ShipMonth,2)/3) AS Quarter;
LOAD * Inline
[
ShipMonth
2017-01
2017-02
2017-03
2017-04
2017-05
2017-06
2017-07
2017-08
2017-09
2017-10
2017-11
2017-12
]
;
QTR.png