Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

rcorcoran
Contributor

Chart showing previous years

Hi

Looking for help with a line chart

I have attached a file with two line charts.  It is supposed to show this year V previous 2 years and target.

Chart 1 is doing this but the expressions are hard coded with the years.  What I really want is like Chart 2 which is working fine if 2014 is selected but when 2015 is selected because there is no data in yet for 2015 it is not showing any of the years.  So I need this to show the previous years even if there is no data in the current year.

Any help would be appreciated

Thanks

1 Solution

Accepted Solutions

Re: Chart showing previous years

Label

=Max(ReferredYYYY)

Expression

=Sum({1<[HWB Screen] ={1},RDOKey={99},ReferredYYYY={'$(=Max(ReferredYYYY))'}  >}ActualValue)

Label

=Max(ReferredYYYY)-1

Expression

=Sum({1<[HWB Screen] ={1},RDOKey={99},ReferredYYYY={'$(=Max(ReferredYYYY)-1)'}>}ActualValue)

Label

=Max(ReferredYYYY)-2

Expression

=Sum({1<[HWB Screen] ={1},RDOKey={99},ReferredYYYY={'$(=Max(ReferredYYYY)-2)'}>}ActualValue)

4 Replies
hrlinder
Honored Contributor

Re: Chart showing previous years

I tried the follwoing Expression for year -1 and year -2 and I get the same Chart as Chart1

for year-1:

=Sum({1<[HWB Screen] ={1},RDOKey={99},ReferredYYYY={'($(=max({1}ReferredYYYY)-1))'}>}ActualValue)

Re: Chart showing previous years

Label

=Max(ReferredYYYY)

Expression

=Sum({1<[HWB Screen] ={1},RDOKey={99},ReferredYYYY={'$(=Max(ReferredYYYY))'}  >}ActualValue)

Label

=Max(ReferredYYYY)-1

Expression

=Sum({1<[HWB Screen] ={1},RDOKey={99},ReferredYYYY={'$(=Max(ReferredYYYY)-1)'}>}ActualValue)

Label

=Max(ReferredYYYY)-2

Expression

=Sum({1<[HWB Screen] ={1},RDOKey={99},ReferredYYYY={'$(=Max(ReferredYYYY)-2)'}>}ActualValue)

Highlighted
rcorcoran
Contributor

Re: Chart showing previous years

Thanks so much Manish that works perfectly

R

rcorcoran
Contributor

Re: Chart showing previous years

Thanks both of you for your help

Community Browser