Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

How do i show only the last 3 years in my Legend

Hi Guys

I have data backing date to 1999 of subscribers (Sites) per month. I want to be able to show the financial monthly trend in a line graph only for the last three years. i.e. have 3 lines each represanting a year being shown over 12 months. Currently its showing all the years from 1999 (see picture below). Please assist.

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: How do i show only the last 3 years in my Legend

You could replace your year dimension with a calculated dimension: =if(Year>year(today())-3,Year). And you'll probably want to check the option Suppress When Value Is Null for the calculated dimension.


talk is cheap, supply exceeds demand
2 Replies
MVP & Luminary
MVP & Luminary

Re: How do i show only the last 3 years in my Legend

You could replace your year dimension with a calculated dimension: =if(Year>year(today())-3,Year). And you'll probably want to check the option Suppress When Value Is Null for the calculated dimension.


talk is cheap, supply exceeds demand
Not applicable

Re: How do i show only the last 3 years in my Legend

Thank you so much Gysbert, this is exactly what i wanted.