Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Karim_Khan
Creator III
Creator III

Fiscal Quarter

how to convert the normal quarter into fiscal quarter in qlikview

KK
1 Solution

Accepted Solutions
sushil353
Master II
Master II

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

View solution in original post

4 Replies
sushil353
Master II
Master II

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

Karim_Khan
Creator III
Creator III
Author

Thnaks Bro

KK
sushil353
Master II
Master II

welcome !

Karim_Khan
Creator III
Creator III
Author

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

KK