6 Replies Latest reply: Jul 29, 2016 5:46 AM by Monika Gupta

# Ignore selection of dimension value in the  chart

Hi,

I have a report in which I have two charts, one is combo chart and other is KPI.

In combo chart, the data is Sales by Year. Year as a dimension value and Sum of Sales for the corresponding year. In this combo chart we are displaying total 5 years of data. i.e we have total 5 bar one for each year. If it current year is 2016 then in combo charts years will be from 2012 till 2016. and their corresponding Sales.

The year in combo chart is a calculated dimension with the below expression :

if(([Year ID] >= \$(vCurrentYear)-4) and ([Year ID]<=\$(vCurrentYear)), [Year ID],Null)

In the second chart which is a  KPI, we are displaying only YTD Sales. i.e. Sales only for Current year (2016).

Now when we select a year in Combo chart, the this value also gets changed which should not change as per the requirement.

The expression used in KPI is :

Sum({<[Year ID]= {\$(vCurrentYear)} >}[Sales Daily])/1000

In case when in the combo chart, I DID NOT used calculated dimension; instead I used dimension only as [Year ID] , then even on the selection of any Year value in it did not had any affect the value in KPI.

It seems when I used the calculated dimension then the associative behavior of the Qlik is not working correctly. Can someone help on this?

• ###### Re: Ignore selection of dimension value in the  chart

How about this:

Sum({<[Year ID] = {\$(=Max({1} [Year ID]))}>}[Sales Daily])/1000

• ###### Re: Ignore selection of dimension value in the  chart

Hi Monika,

Try this:

Sum({<[Year ID] = {\$(=Max([Year ID]))}>}[Sales Daily])/1000

Now if you select any year it will become max Year.

Regards

KC

• ###### Re: Ignore selection of dimension value in the  chart

Sum({<[Year ID]= {\$(vCurrentYear)} >}[Sales Daily])/1000

In this expression, for variable vCurrentYear the definition should be =max(Total [Fiscal Year])

• ###### Re: Ignore selection of dimension value in the  chart

Thanks for the response but this is not what my requirement is.

KPI chart has to always show YTD sales which in current case it is showing correct.

And combo chart is also showing sales for last 5 year which is also correct.

But if I select any bar in the combo chart then I donot want that the filter should be applied in the KPI chart. I want to restrict this associative behavior of the qlik.

• ###### Re: Ignore selection of dimension value in the  chart

Have you given this a try?

Sum({<[Year ID] = {\$(=Max({1} [Year ID]))}>}[Sales Daily])/1000

• ###### Re: Ignore selection of dimension value in the  chart

Yes, this is also not working.