Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
nwilliams
Contributor
Contributor

Comparing Data by months and Fiscal Year

 

Hi,

I'm trying to create a chart that shows 24 months of data, but only compares the last 2 Fiscal years.

I'm using set analysis in my expression to pull back the previous 24 months work of data based on the month selected. Now I want 1 expression for the current FY, and one for the previous FY.

I've currently manually put this in simply by adding "Calendar.UKFYYear = {'FY15'}" to the expression, and this works fine.

 

However, I want to make this maintenance free, and want the "FY15" bit to be calculated based on the month selected.

I have attached the QVW file so you can see what I'm doing.  The expression I'm using is:

 

=sum({<
Calendar.MonthName = {">=$(=Addmonths(Max(Calendar.MonthName),-24)) <=$(=Max(Calendar.MonthName))"},
Calendar.UKFYYear = {'FY15'}
>}
Sent)

Any thoughts on how this can be done would be grateful, as I've been playing with this for some time and had no luck.

 

0 Replies