Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
brunolelli87
Creator II
Creator II

Show expression based on listbox selections

Hello guys,

How can I show some expressions on the chart based on the user's selection of items on a Listbox?

The ListBox is using the fieldName called NDIC, and I'm currently lysing the following conditional expression:

NDIC='DOLLAR'


But, as you can see below, this expression is working only if the user selects just DOLLAR, otherwise, if he selects DOLLAR and EURO, the system is not showing the DOLLAR and EURO lines...

Please, check the pictures below:

Nothing selected
1.png

Dollar selected:

2.png

Euro, just EURO, selected

3.png

Both selected. 
I was expecting to see the blue, and both YELLOW and RED lines...
how can I do it?

4.png

 

Thanks
Bruno

2 Solutions

Accepted Solutions
sunny_talwar

Try this as your condition

 

SubStringCount('|' & GetFieldSelections(NDIC, '|,|') & '|', '|DOLLAR|') = 1

 

 

View solution in original post

brunolelli87
Creator II
Creator II
Author

Hello,

Your help was correct... there was just a mistyping with parentheses...

The correct formula is:

SubStringCount('|' & GetFieldSelections(NDIC, '|,|') & '|', '|DOLLAR|') = 1

 

 

Thank you os much!

View solution in original post

3 Replies
sunny_talwar

Try this as your condition

 

SubStringCount('|' & GetFieldSelections(NDIC, '|,|') & '|', '|DOLLAR|') = 1

 

 

brunolelli87
Creator II
Creator II
Author

Hello,

Thanks for your help, but it's now working.

It seems we have an issue with the expression:
5.png

 

And no matter what I select (or not), the DOLLAR line is always visible!

6.png7.png

brunolelli87
Creator II
Creator II
Author

Hello,

Your help was correct... there was just a mistyping with parentheses...

The correct formula is:

SubStringCount('|' & GetFieldSelections(NDIC, '|,|') & '|', '|DOLLAR|') = 1

 

 

Thank you os much!