Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
danielle_v
Creator
Creator

Current vs. Previous Fiscal Year Expression

Hi All,

I am doing some analysis using a fiscal calendar where the years are formatted as 2013/2014, 2014/2015 etc. These have been loaded into the script using the dual function, so each fiscal year also has a numeric value.

With a little help from the Qlikview community, I have managed to create some variables for the years to be used for labelling, these are;

vCurrentYear = Cal_FiscalYear

vPreviousYear = num(left(MaxString(Cal_FiscalYear),4)-1)&'/'&num(right(MaxString(Cal_FiscalYear),4)-1,'00')

However, my issue now is that I'm struggling to do any calculations based on current year and previous year (I want to look at volume for the selected year vs. volume for selected year minus 1) . My variables don't seem to work in calculations, and I've tried all sorts of set analysis but can't seem to get anythgin to work. I seemt o be able to get the selected year calculation to work ok, but can't get any set analysis around year-1 to bring back any data.

Any guidance much appreciated!

1 Solution

Accepted Solutions
c_gilbert
Creator II
Creator II

This is the set analysis we use for the previous year:

=Sum ({$<Year_Fiscal = {'$(vPreviousFiscalYear)'} >}

[Op Activity Count]

)

View solution in original post

3 Replies
c_gilbert
Creator II
Creator II

This is the set analysis we use for the previous year:

=Sum ({$<Year_Fiscal = {'$(vPreviousFiscalYear)'} >}

[Op Activity Count]

)

danielle_v
Creator
Creator
Author

Worked perfectly... many thanks for helping me out again!!

c_gilbert
Creator II
Creator II

No problem, happy to help