Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have created Quarter for a year. Q1-JAN,FEB, MAR Q2-APR MAY JUN Q3-JUL AUG SEP Q4-OCT NOV DEC.
BUT I WANT Q1 as APR, MAY, JUN
pls help me how can i change it.
Could you show us how you´ve created your Quarter?
Where you created these mapping in a File or in an INLINE load.
A sample will help here.
Try with :
quartername(Date_field, 0, 4)
Add new mapping table in your data model.
Ex:-
QrtMap:
Mapping LOAD
[
Month,Quarter
APR,Q1
MAY,Q1
JUN,Q1
JUL,Q2
AUG,Q2
SEP,Q2
OCT,Q3
NOV,Q3
DEC,Q3
JAN,Q4
FEV,Q4
MAR,Q4
];
LOAD
ApplyMap('QrtMap',MonthField,Null()) as NewWuarter
from Location;
Try like this at backend
'Q' & alt(if(Month([Date])<4,4),if(Month([Date])<7,1),if(Month([Date])<10,2),3) as Quarter
I HAVE create two varibles V1 as start date from 1-1-2001' v2 end date 31-12-2010'
using dual (ceil(month/3)) like that way i have creatd, but my business year started from Apr_Mar not jan_Dec
could you post your exact code?
I´m gonna change it for you
Hello
Put Following Script In Your Backend-
Temp:
Load
min(Date) as minDate,
max(Date) as maxDate
Resident MainData;
Let varMinDate = Num(Peek('minDate', 0, 'Temp'));
Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));
DROP Table Temp;
Master Calender:
Load *,
dual('Q'&ceil([Fiscal Month Num]/3),ceil([Fiscal Month Num]/3)) as FiscalQuarter;
Load
if (month(TempDate)<=3,month(TempDate)+(12-3), month(TempDate)-3) AS [Fiscal Month Num];
LOAD
$(varMinDate) + Iterno()-1 As Num,
Date($(varMinDate) + IterNo() - 1) as TempDate
AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);
Regards
Vikas
Please try with
dual('Q'&ceil(Addmonths([Fiscal Month Num],3)/3),ceil(Addmonths([Fiscal Month Num],3)/3)) as FiscalQuarter;