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: 
Not applicable

Fiscal Year in master calendar

hello,

Is it possible to have a single field in a given period (fiscal year):
- I have a company A with a fiscal year that runs from the 01/10/yyyy 30/09/yyyy
- company B with a fiscal year that runs from the 01/07/yyyy 30/06/yyyy

Can you help me?

below my master calendar

Calendar: 

LET vDateMin = Num(MakeDate(2003,1,1)); 

LET vDateMax = Floor(MonthEnd(Today())); 

LET vDateToday = Num(Today()); 

//USE-SPECIFIC

TempCalendar: 

LOAD

$(vDateMin) + RowNo() - 1 AS DateNumber, 

Date($(vDateMin) + RowNo() - 1) AS TempDate 

AUTOGENERATE 1 

WHILE $(vDateMin)+IterNo()-1<= $(vDateMax); 

Calendar: 

LOAD

Date(TempDate) AS CalDate, 

// Date Standard

Day(TempDate) AS CalJourDuMois, 

WeekDay(TempDate) AS CalNomDuJour, 

Week(TempDate) AS CalNumeroSemaine, 

Month(TempDate) AS CalNomDesMois, 

'T' & Ceil(Month(TempDate)/3) AS CalTrimestre, 

Year(TempDate) AS CalAnnée, 

// Nom Date 

WeekName(TempDate) as CalNumSemaineAnnee, 

MonthName(TempDate) as CalMoisAnnee, 

QuarterName(TempDate) as CalendarTrimMoisAnnee, 

// Date de début 

DayStart(TempDate) as CalPremierJour, 

WeekStart(TempDate) as CalDebutDeSemaine, 

MonthStart(TempDate) as CalDebutMois, 

QuarterStart(TempDate) as CalDebutTrimestre, 

YearStart(TempDate) as CalDebutAnnee, 

// Date de fin 

DayEnd(TempDate) as CalFinJour, 

WeekEnd(TempDate) as CalFinSemaine, 

MonthEnd(TempDate) as CalFinMois, 

QuarterEnd(TempDate) as CalFinTrimestre, 

YearEnd(TempDate) as CalFinAnnee, 

RESIDENT TempCalendar ORDER BY TempDate ASC; 

DROP TABLE TempCalendar; 

LET vDateMin = Num(MakeDate(2000,1,1)); 

LET vDateMax = Floor(YearEnd(AddMonths(Today(), 12))); 

LET vDateToday = Num(Today()); 

1 Solution

Accepted Solutions
Not applicable
Author

1 Reply
Not applicable
Author