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

Previous year calculation

I have an expression in a table that calculates the number of enrolments when a user selects a year.  I would like to add a column to the table that calculates the number of enrolments for the previous year.  I am having difficulty doing this and wonder if it is because my Year field is presented in the following format e.g. 2015-16 to represent an academic year.

Thanks for any help.

Greg

3 Replies
ahaahaaha
Partner - Master
Partner - Master

Hi Greg,

Maybe you will shared a small fragment of the original data and the expected result?

Regards,

Andrey

Anil_Babu_Samineni

How about this?

Count({<Year = {'$(=Max(Year)-1)'}>} enrollment)


I know you have format like 2015-16. You can play with some Date format

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
zebhashmi
Specialist
Specialist

try this

with same format you are calculation current year

Count({<Year = {'$(=only(Year)-1)'}>} enrollment)


other then that i think you have to make an other table

like

2015-16     July 1 2015     Jun 30 2016

2016-17     July 1 2016     Jun 30 2017

and use intervalmatch to like with you Master Calendar