Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
rvijayanth
Creator
Creator

How to build a EXCLUDE FROM filter in QlikSense?

Here is my data:
Design IDColor
100Yellow
100Green
200Yellow
200Blue

I have a filter pane for "Color":

If I select Yellow, we show Design ID 100 and 200

***Below is my requirement***

I want to have a second filter called "Exclude Color":

If I select Yellow in filter filter and "Green" in second (exclude) filter, I want to be able to exclude the row where Color is Green and return just Design ID 200. 

Please help me to figure this out. 

2 Replies
UserID2626
Partner - Creator III
Partner - Creator III

Hi,

create an alias name for the field color first

LOAD
Business_Date,
Pack as "Pack Type",
Pack,
Amount
FROM [lib://Ex/Combochart Sample.xlsx]
(ooxml, embedded labels, table is Sheet1);

 

then keep as two separate filter and set an alternate state for one filter 

Image.JPG

 

then create a measure with alternate state

https://community.qlik.com/t5/QlikView-App-Development/Is-possible-to-use-alternate-States-with-set-...

https://community.qlik.com/t5/New-to-Qlik-Sense/Alternate-state-in-Calculation-condition-section-qli...

 

if(GetSelectedCount(Pack)>0 and GetSelectedCount([Pack Type],true(),'A')>0,
Sum({<Pack=$::Pack,[Pack Type]-=[A]::[Pack Type]>}[Amount])
,
if(GetSelectedCount(Pack)>0,
Sum({<Pack=$::Pack>}[Amount])

,
if(GetSelectedCount([Pack Type],true(),'A')>0,
Sum({<[Pack Type]-=[A]::[Pack Type]>}[Amount]))))

Attaching sample app

rvijayanth
Creator
Creator
Author

Thanks for the reply. I will try this solution