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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Have chart ignore calendar selections

I have a calendar table that's linked to another table with a month, year, and date field. I want to make a graph that shows values for the selected year and the previous year. So there would be a set of bars representing data for 2010 and another set for 2009 if the user selects 2010. I'm having trouble witht he previous year expression. Here's what I have so far:

Sum({$<SaleYear={$(=only(Year - 1))}>} SaleAmount)

Nothing it being displayed for this expression. Year is the year selected on the form.

Thanks!

2 Replies
pover
Partner - Master
Partner - Master


The syntax looks good, but maybe try a max(). I assume SaleYear and Year are numbers, but that might also be work double checking.

Sum({$<SaleYear={$(=max(Year - 1))}>} SaleAmount)

Regards.

hector
Specialist
Specialist

Hi, Maybe this way?

Sum({$<SaleYear={$(=Max(Year) - 1)}>} SaleAmount)

rgds