Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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.


2 Replies

Have chart ignore calendar selections

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)


Valued Contributor

Have chart ignore calendar selections

Hi, Maybe this way?

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