Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Previous year set analysis

Hi

I am trying to use set analysis to do a year on year comparison using the below. This works on a normal year eg 2012 but our financial year is 2012/13.

Does anyone know how i can get the previous year so 2011/12?

=Only (JOINERCalendar.FinancialYear - 1)

Thanks

Manisha

3 Replies
MayilVahanan

Hi,

     Try this,

     =Date(AddMonths(Date#('2012/12','YYYY/MM'),-12) ,'YYYY/MM')

     gives 2011/11

     Hope it helps

Thanks & Regards,
Mayil Vahanan R
Not applicable

Hi Mayil

Thanks for your quick response the financial year can be selected so i changed your code to the below:

   =Date(AddMonths(Date#(JOINERCalendar.FinancialYear,'YYYY/MM'),-12) ,'YYYY/MM')

however if i have 2011/12 selected then the previous year shows as 2010/12 instead of 2010/11?

Regards

Manisha

v_iyyappan
Specialist
Specialist

Hi,

   Use like this in dynamic date

    = Date(AddMonths(Today(),-12) ,'YYYY/MM') you will get the 2011 / 07 where Today() replace of your datefield.

OR

     = Date(AddMonths(Date#('2012/12','YYYY/MM'),-13) ,'YYYY/MM') you will get 2011/ 11

Hope its help

Regards,

Iyyappan.