Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
userid128223
Creator
Creator

remove multiple items from field

I have table like below.

Student

John

Cline

Viennesa

Ivan

Mike

I want to create a button to exclude John & Mike from selection once Button is pressed. How can i achieve this.

Thanks

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

Concat picks up multiple values so in this case it will pick student names other than John and Mike. Like Cline, Ivan and Venessa. So in a button action selection string this is how you will with hardcoded like

(Cline|Ivan|Vanessa) So with concat this is exactly what the concat picking like

(Cline|Ivan|Vanessa). hope this helps.

View solution in original post

15 Replies
vishsaggi
Champion III
Champion III

What should happen when you clear selections? Does all the names should show? Where these values should be displayed in a Listbox? Or in a chart? If list box then go to List box properties then check the box Hide Excluded.

Then create a button with action as Select in Field then give Student as field and string as

= '(' & Concat({< Student -= {'John', 'Mike'} >}Student, '|') & ')'

userid128223
Creator
Creator
Author

I don't want to just hide the name but instead want to remove them from selection for all the charts & list box.

i have button that selects multiple value for one field. In the same button i wanted to now exclude multiple value for 1 field.

vishsaggi
Champion III
Champion III

Try to use that Set statement in your button. Can you share the expression you are using for the button you have?

{< Student -= {'John', 'Mike'} >}


Can you share a sample you are working on?

userid128223
Creator
Creator
Author

Attached is example. I have Button1 which selects Student Cline, Ivan  & Mike.

Below is what i want to do.

1) Exclude Teacher = Allen

2) Select Mike, Ivan & Cline

Both using same button.

Final Result: Cline & Ivan will be highlighted. As Mike has Allen as teacher.

vishsaggi
Champion III
Champion III

Allen has a student Ivan so when teacher Allen is excluded his student Ivan is excluded so only Mike and Cline will be selected. Is it not. ?

userid128223
Creator
Creator
Author

Yes

vishsaggi
Champion III
Champion III

use this as your search string and see.

= '(' & Concat({< Student = {'Cline', 'Mike', 'Ivan'}> - <Teacher = {'Allen'}>} Student, '|') & ')'

userid128223
Creator
Creator
Author

when you select Teacher Allen and select excluded it shows up in your Current selection box. How do you see the same results when you are doing via button

vishsaggi
Champion III
Champion III

Did not get you. Can you send me a screen shot of what you are expecting?