Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to make Quarter field from Year and Month Dimension
Please help
I have data like Apr2014, so may periods are preset like that
May be like this:
'Q' & Ceil(Month(Date#(YearMonth, 'MMMYYYY'))/3) as Quarter
You need to start with a QV date field, so if you have Year and Month dimensions, you may need to parse the field values to create a date:
Makedate( Year, Month) //if Month and Year have numeric representation
Date#( Month&Year, 'MMMYYYY') // if Month is a text only
Then use e.g. QuarterStart(DateField) to create a quarter dimension
Hi Agnivesh,
From a month field you can create:
Ceil(Num(Month)/3) & 'Q' // you can add the year if you want.
From a 'Apr2014' date you can do:
Ceil(Num(Month(Date(Date#(DateField, 'MMMYYYY')))) /3) & 'Q' // If you want the year you can add "& Right(DateField, 4)"