May 1, 2023

Qliksense apply filter to only one chart on the sheet

 Expression: 

Sum({<[dataset.field1]={'$(=GetFieldSelections([FilterOne]))'},[dataset.Year]={$(v_YEAR_FILTER)}>} [dataset.sales])


v_YEAR_FILTER  is variable which holds expression of unique value. 


v_YEAR_FILTER=Concat(Distinct If(Len(Trim(Aggr(Only({<year={$(=Concat(Distinct Chr(39)&[dataset.Year]&Chr(39),','))}>}year),year))) = 0,Null(),Chr(39)&Aggr(Only({<year={$(=Concat(Distinct Chr(39)&[dataset.Year]&Chr(39),','))}>}year),year)&Chr(39)),',')


QlikSense Casecade/ display only available values based on previous filter selection

 =Aggr(Only({<year={$(=Concat(Distinct Chr(39)&[dataset.Year]&Chr(39),','))}>}year),year)

Apr 11, 2023

QlikSense between two selected Range. using set analysis expression

 =Avg({<gender={'Male'},country={'$(tCountry)'},age={">=$(tSlide1)<=$(tSlide2)"}>}value) 

Mar 22, 2023

Hide/show field based on dropdown selection in QlikSense

Inline table in the query editor for drop down static list:

Scenario_Comp_Filter:

Load * inline [

MID,Measure

1,"Sales"

2,Percentage

];

Dropdown selected values in the aggreegate.

If(GetSelectedCount(Measure)=0,Num(Sum([Sales]),'#,##0'),

 Pick(Match(MID,'1','2'),

Num(Sum([Sales]),'#0.00%'),

Num(Sum(Percentage),'#,##0'),


//Num(Sum([Sales]),'$###,##0'),  


))

Use below expression in Show condition of the field. 


 If(GetSelectedCount([Level 1]) > 0 ,$(=SubStringCount(Concat([Level 1],'|'),'Field1')),0)