Skip to main content
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
Showing results for 
Search instead for 
Did you mean: 
Specialist III
Specialist III

Sum for previous year

I have Chart whic am using to compare current year and previous year

my requirement is like if i select some dates in calendar it should show sum for cy and py

for cy it is working fine

am confused with previous year calculation

i should show sum of previous year for those selected dates

4 Replies

Share me one example please

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

Look into As Of Table: The As-Of Table

Not applicable


Perhaps something like:

For Current year: =Sum({$<Year={$(=Max(Year))}>}Sales)

For last Year:-=  =Sum({$<Year={$(=Max(Year)-1)}>}Sales)

or alternatively, you can look at this: How to create year to year comparison bar chart?

Specialist III
Specialist III

this is to get previous year

but my requirement is lik if i select some dates in calendar i should get sum for same dates in previous year