Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how to convert the normal quarter into fiscal quarter in qlikview
In ur Master calendar:
add below line
'Q' & if(Ceil(Month(TempDate)/3)=1,4,Ceil(Month(TempDate)/3)-1) as FS_Quarter,
here TempDate is Date sequence.
HTH
Sushil
In ur Master calendar:
add below line
'Q' & if(Ceil(Month(TempDate)/3)=1,4,Ceil(Month(TempDate)/3)-1) as FS_Quarter,
here TempDate is Date sequence.
HTH
Sushil
Thnaks Bro
welcome !
Hi Sushil,
Cisco Quarter is starts from Aug'15 to Jul'15.
Our Normal Quarter is calculating correclty
Jan to Mar -Q1
Apr to Jun -Q2
Jul to Sep -Q3
Oct to Dec -Q4.
But Cisco Quarter is showing wrong calculation as per given script
TempCalendar:
LOAD
$(varMinDate) + Iterno()-1 As Num,
Date($(varMinDate) + IterNo() - 1) as TempDate
AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);
MasterCalendar:
Load
TempDate AS Date,
week(TempDate) As Week,
Year(TempDate) As Year,
Month(TempDate) As Month,
Day(TempDate) As Day,
YeartoDate(TempDate)*-1 as CYTD,
YeartoDate(TempDate,-1)*-1 as LYTD,
inyear(TempDate, Monthstart($(varMaxDate)),-1) as Rolling12,
date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,
ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,
'Q' & if(ceil(floor(Month(TempDate)/3))=1,4,ceil(floor(Month(TempDate)/3-1))) as Fiscal_Quarter,
Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear,
WeekDay(TempDate) as WeekDay
Resident TempCalendar
Order By TempDate ASC;
Drop Table TempCalendar;
Its showing wrong Quarter
Jan to Mar -Q4
Apr to Jun -Q1
Jul to Sep -Q2
Oct to Dec -Q4.
It should be like
Aug to Oct - Q1
Novto Jan - Q2
Feb to Apr - Q3
May to Jul- Q4