Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to make fiscal calender as Dynamic?

Hi All,

Here my fiscal calener is started from Sep-Aug  and i don't have months i have periods that each period contains 28 days only.

how can i make Quarter,Period,Week without hard code i want to make it as dynamic calender because i can't work on each year for manually changing the calender.

Please find attached file for Fiscal year and for making periods.

Thanks in Advance plz help

Thanks,

Ashok.

4 Replies
Not applicable

Re: How to make fiscal calender as Dynamic?

Suggest me some way?

Re: How to make fiscal calender as Dynamic?

I depends on how it is defined... If the fiscal year always starts on the first Monday of September, and each Period is 28 days long, the following can be used as script:

Load *,
1 +
Div(Date - FirstDayOfYear,28) as Period;
Load *,
WeekStart(YearStart(WeekStart(Date),0,9)-1,1,0) as FirstDayOfYear; //First Monday of year
Load
Date(MakeDate(2012,8,31)+RecNo()) as Date
Autogenerate 3000;

HIC

Re: How to make fiscal calender as Dynamic?

...and if the year start instead is on the Monday closest to Sept 1st, the following can be used:

Load *,
1 + Div(Date - FirstDayOfYear,28) as Period;
Load *,
WeekStart(4+YearStart(WeekStart(Date),0,9)-1) as FirstDayOfYear; //Monday closest to 9/1

HIC

Not applicable

Re: How to make fiscal calender as Dynamic?

Hi Henric,

Thanks for reply it's helpful to me.

Thanks,

Ashok.