Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Help on how to add 1 to the default fiscal year created by qlikview component

Hi,

I was wondering if anyone knoew of a best approach to add 1 to the actual fiscal year created by the qlikview component.

For example. Creating caelndar qith QVC setting start of month as september (9)

This is how it would create the dates.

Original DateFiscal Year
8/1/20122011
9/1/20122012
10/1/20122012
11/1/20122012
12/1/20122012
1/1/20132012
2/1/20132012
3/1/20132012
4/1/20132012
5/1/20132012
6/1/20132012
7/1/20132012
8/1/20132012
9/1/20132013

The following is how I would like the scrip to create the fiscal year.

Original DateFiscal Year
8/1/20122012
9/1/20122013
10/1/20122013
11/1/20122013
12/1/20122013
1/1/20132013
2/1/20132013
3/1/20132013
4/1/20132013
5/1/20132013
6/1/20132013
7/1/20132013
8/1/20132013
9/1/20132014

Any help would be appreciated,

Thanks.

Tags (2)
1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Help on how to add 1 to the default fiscal year created by qlikview component

Try an offset of -3 instead of 9: call qvc.calendarfromfield('MyDate','FiscalCalendar',,-3);


talk is cheap, supply exceeds demand
5 Replies
Not applicable

Re: Help on how to add 1 to the default fiscal year created by qlikview component

maybe you can find something inspiring  in this recent blog post :

http://community.qlik.com/blogs/qlikviewdesignblog/2013/05/28/fiscal-year

Highlighted
MVP & Luminary
MVP & Luminary

Re: Help on how to add 1 to the default fiscal year created by qlikview component

Try an offset of -3 instead of 9: call qvc.calendarfromfield('MyDate','FiscalCalendar',,-3);


talk is cheap, supply exceeds demand
Not applicable

Re: Help on how to add 1 to the default fiscal year created by qlikview component

Do I understand it right that you want Fiscal Year to be exactly + 1 to year generated by QVC? Why not just add FY+1 as additional field after calendar was generated by QVC?

Calendar:

Join (Calendar) LOAD

     FiscalYear,

     FiscalYear + 1 as NewFiscalYear

RESIDENT Calendar;

Not applicable

Re: Help on how to add 1 to the default fiscal year created by qlikview component

Thanks for the reply.

The thing is I already had FiscalYear in many of the controls and so it would mean I would have to change all the controls where I ave used FiscalYear.

"Try an offset of -3 instead of 9: call qvc.calendarfromfield('MyDate','FiscalCalendar',,-3);" worked for me.

Not applicable

Re: Help on how to add 1 to the default fiscal year created by qlikview component

Thanks! This is what I was looking for.

Again thanks for the reply.