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

Last Fiscal Year comparison

Hi All,

I just started to build reports in Qlikview and seek some help for the following.

I encountered a small issue while trying to do Year on Year analysis in Qlikview.

I want to show column for June in the previous financial year (i.e June 2014 for 2013/2014 fin year).

I tried to use standard approach which is

=Sum ({$<FY= {$ (=Max (FY)-1)}, Month = {June} >} Amount)).

However, QlikView does not seem to recognize my FY field as numerical. It works with max (FY) but not with max(FY)-1.

I do not have a master calendar. Here are all my date-related fields in the load script.

Month(Date) as Month,

Year(Date) as Year,

quarterName(Date) as Quarter,

Date(Monthstart(Date), 'MMM-YYYY') as YearMonth,

Date(yearstart(Date,0,7),'YYYY') as FY,

dual(year(addmonths(Date, 1-$(vFirstMonth))) & '/' & right(year(addmonths(Date, 1-$(vFirstMonth)))+1,2), year(addmonths(Date, 1-$(vFirstMonth)))) AS DateFieldFiscalYear,

dual('Quarter ' & ceil(month(addmonths(Date, 1-$(vFirstMonth)))/3), ceil(month(addmonths(Date, 1-$(vFirstMonth)))/3)) AS DateFieldFiscalQuarter,

num(month(addmonths(Date, 1-$(vFirstMonth))))AS DateFieldFiscalMonth,

Thanks a lot in advance,

Chris

3 Replies
Not applicable
Author

Fiscal Year

That should help!!

Not applicable
Author

Thanks Ram,

I used the model by Henric. However when I try to get June previous year values, it doesnt seem to work.

Here is my set expression.

=sum({$<fyear = {$(=Max(fyear)-1)}, fmonth={"6"}, YearMonth = , Quarter=, Year =, Month =, FMonth =, FYear =, Date = >} Amount/1000)

Am I doing something wrong?

Chris

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=sum({$<fmonth={"6"}, YearMonth = , Quarter=, Year ={$(=Max(Year)), $(=Max(Year) - 1)}, Month =, FMonth =, FYear =, Date = >} Amount/1000)


The above expression gives the 6 th month Amount for 2014 and 2013.


If you want previous year then use this


=sum({$<fmonth={"6"}, YearMonth = , Quarter=, Year ={$(=Max(Year) - 1)}, Month =, FMonth =, FYear =, Date = >} Amount/1000)


Regards,

Jagan.