Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
limfungkeat
Contributor III
Contributor III

Filtering Based on Expression Results

Customer NameFocus Product (RM ) All Products ( RM )ClassContribution
Total1,007,350.821,136,457.53A88.64%
AAA50,680.5054,960.50A92.21%
BBB23,925.5024,920.90A96.01%
CCC22,134.2022,134.20A100.00%
DDD21,000.0021,000.00A100.00%
EEE18,451.4818,835.48A97.96%
FFF17,529.0423,287.96A75.27%
GGG15,661.6019,552.60A80.10%
HHH15,659.8218,312.78A85.51%
LLL13,032.6813,032.68A100.00%
MMM12,733.8022,601.85A56.34%
NNN11,169.6011,169.60B100.00%
OOO10,750.0010,750.00B100.00%
PPP10,500.0011,914.40B88.13%
QQQ10,457.7411,457.74B91.27%
RRR10,436.8011,084.80B94.15%
SSS10,286.0011,647.40B88.31%
TTT9,012.009,012.00B100.00%
YYY8,990.3910,312.97B87.18%
UUU8,814.909,732.90B90.57%
VVV8,756.009,507.08B92.10%
ADASD8,607.809,231.80B93.24%
ASDSA8,076.209,250.40B87.31%
ASDSAD7,904.507,904.50B100.00%
ZXCZX7,800.007,800.00B100.00%

My dimension is Customer Name and the column Class is an  expression If([Exclusive %] <= 0.2, 'A', If([Exclusive %] <=0.70, 'B', If([Exclusive %] <= 0.90,'C',If([Exclusive %] <= 1.0,'D')))). How am i suppose to my this column filterable , so that when i click say one of the class A ...All the class A will shows..As at now, it will only showing one record ...

11 Replies
Kushal_Chawda

Go to presentation tab of straight table -> click on Class expression and check "Searchable" option.

limfungkeat
Contributor III
Contributor III
Author

Thanks Kushal , apologise for not telling you that i have tried your approach before i posted the question . It just not get filtered correctly . When i did put in the Searchable option and search / click 'A'. The filtered data record is not the same comparewith the original Class A ,before it gets filtered

zebhashmi
Specialist
Specialist

i can't try it right now, so not sure how it will work

but what about adding a field of Class in Data and filler it from List box

limfungkeat
Contributor III
Contributor III
Author

Hi Jahanzeb, the column Class was built base on an expression . It is not a field from any of the table . Tried to do the below , but the field Class is not linked to any of the table / field structure :

CLASS_DEFINITION :
LOAD * INLINE [

CLASS,DEFINITION
A ,   CLASS A,
B,    CLASS B,
C,    CLASS C,
D,    CLASS D

];

zebhashmi
Specialist
Specialist

r u looking for this

test1.PNG

test2.PNG

zebhashmi
Specialist
Specialist

if not then may be you can do

DEFINITION :
LOAD * INLINE [

V1,V2,DEFINITION
0, 0.2, CLASS A,
0.2, 0.7, CLASS B,
];

and use intervalmatch on that.

Kushal_Chawda

try like below, create class field in scripr

Data:

LOAD *,

If([Exclusive %] <= 0.2, 'A', If([Exclusive %] <=0.70, 'B', If([Exclusive %] <= 0.90,'C',If([Exclusive %] <= 1.0,'D')))) as Class

FROM table;

Now use this class as dimension in table instead expression

limfungkeat
Contributor III
Contributor III
Author

Hi Kushal

Data:

LOAD *,

If([Exclusive %] <= 0.2, 'A', If([Exclusive %] <=0.70, 'B', If([Exclusive %] <= 0.90,'C',If([Exclusive %] <= 1.0,'D')))) as Class

FROM table;

FROM table ...this table is what table ?

limfungkeat
Contributor III
Contributor III
Author

The column/ Field [Exclusive %] is not stored in any table, it is constructed base on an expression :

RangeSum(Above(Sum(SALES), 1, RowNo())) / Sum(total SALES)