Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
Beginners question. I'm looking for the possibility to show only the 2 latest years from a data set in a graph. I've tried using the 'enable conditional' option on the dimensions tab, however have not managed to write the appropriate condition.
My first attempt looked similar to if(YEAR=2014, YEAR, 0) So if the year is 2014, show year else show nothing.
I hope to be pointed to some reading material/examples!
Thnx!
Barry Harmsen's book QlikView for developers is great.
For your issue:
sum({<Year = {$(=max(year))}>}Your_field) for the latest year
and
sum({<Year = {$(=max(year)-1)}>}Your_field) for the previous latest year
Combined in 1 expression gives you the total, just add the 2 separate expressions in 1 and let the add ( + )
sum({<Year = {$(=max(year))}>}Your_field) + sum({<Year = {$(=max(year)-1)}>}Your_field)