Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlik1_User1
Specialist
Specialist

Disabling of filter for a chart in qliksense

HI All,

I have 4 filters in my qliksense app, is there is a possibility that I can use  4 of them for one chart and only 3 for the remaining items in the app?

Lets say Table chart is used with

Dim - Country
Measure - Sum({$<Year=>}Amount)
Filed year has values 2019,2020

but when year 2020 is selected countries which are belong to 2019 are coming as NULL and data is shown for 2020 year countries.

Expected behavior - Irrespective of selection table chart should remain same (should show 2020,2019 data)as expression is used to ignore selections for the dimension called Year in a sum function for a measure(Sum({$<Year=>}Amount))

Can not use Alternate states are there are 4 filters and 4 chart, as in 1 chart all filters should work and for remaining charts only 3 filters should work.

Please help!!

11 Replies
Kushal_Chawda

Is the year exclusion is not working as expected?

Qlik1_User1
Specialist
Specialist
Author

@Kushal_Chawda yes year exclusion is not working

Kushal_Chawda

is there any calculated dimensions you are using? Ideally it should work. Make sure that the year field name is correct in set exclusion. fieldname is case sensitive

Qlik1_User1
Specialist
Specialist
Author

@Kushal_Chawda yes there is calculated dimensions..

yes field name is correct...

Not sure what is issue here,why chart is not working. 

Kindly sugest what is missing here..

Kushal_Chawda

Calculated dimension is the culprit here. You need to exclude the year selection in calculated dimension as well. If you can share the expression for calculated dimension I can tell you what you can do

Qlik1_User1
Specialist
Specialist
Author

Hi @Kushal_Chawda 

Below are the expression for calculated dimensions. Table is the chart used.

Dimension -
1. Country &'-'& Date(if(multi=1, RDate,R2Date),'DD-MM-YYYY')
2. Country&' '&'('& date(rdate,'DD MMM YYYY')&')'
3. Area
4. IF(change='true','Yes','No')

Please suggest!!

Kushal_Chawda

try below. check fieldname reference and adjust accordingly

1. aggr(only({<Year>}Country),Country) &'-'& Date(if(aggr(only({<Year>}multi),multi)=1, 
aggr(only({<Year>}RDate),RDate),aggr(only({<Year>}R2Date),R2Date),'DD-MM-YYYY')
2. aggr(only({<Year>}Country),Country)&' '&'('& date(aggr(only({<Year>}rdate),rdate),'DD MMM YYYY')&')'
3. Area
4. IF(aggr(only({<Year>}change),change)='true','Yes','No')

 

Qlik1_User1
Specialist
Specialist
Author

Hi @Kushal_Chawda  this is not working..
Dimension name is not getting correctly for e.g.
for this expression

aggr(only({<Year>}Country),Country)&' '&'('& date(aggr(only({<Year>}rdate),rdate),'DD MMM YYYY')&')'

this is coming for this expression

Qlik1_User1_6-1598351567795.png

 

Kushal_Chawda

try below

1. aggr(only({<Year>}Country),Country,Area,RDate,R2Date,rdate) &'-'& Date(aggr(if(only({<Year>}multi)=1, 
only({<Year>}RDate),only({<Year>}R2Date)),Country,Area,RDate,R2Date,rdate),'DD-MM-YYYY')
2. aggr(only({<Year>}Country),Country,Area,RDate,R2Date,rdate)&' '&'('& date(aggr(only({<Year>}rdate),Country,Area,RDate,R2Date,rdate),'DD MMM YYYY')&')'
3. Area
4. aggr(IF(only({<Year>}change)='true','Yes','No'),Country,Area,RDate,R2Date,rdate)