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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
raynac
Partner - Creator II
Partner - Creator II

Conditional display of multiple expression lines

I have a chart with 5 expression lines and my company owner wants to be able to choose the one(s) he wants to see at any given time.

I built a selection box and used conditional enabling in the chart to show the ones requested by the selector but apparently it's not that simple.  If I select one, hooray!  I get the one I want.  If I select more than one, I get an error message saying all expressions are disabled.

 

Single SelectionSingle SelectionAnything more than a single selectionAnything more than a single selection

And because I know it's helpful and someone will ask (Smiley Happy), I am attaching the view.  Can anyone please point me in the right direction?

Thank you!

1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

You have used

if(vsel_chart_typ='a',...

that will not work. vsel_chart_typ will return empty string when more that 1 value is possible

use something like below

SubStringCount(Concat(vsel_chart_typ,'|'),'a')

as the condition

 

please note you have a and ab there that may cause issues. i suggest giving full names in the vsel_chart_typ dimension

like Abandoned and use above substring count method

 

View solution in original post

2 Replies
dplr-rn
Partner - Master III
Partner - Master III

You have used

if(vsel_chart_typ='a',...

that will not work. vsel_chart_typ will return empty string when more that 1 value is possible

use something like below

SubStringCount(Concat(vsel_chart_typ,'|'),'a')

as the condition

 

please note you have a and ab there that may cause issues. i suggest giving full names in the vsel_chart_typ dimension

like Abandoned and use above substring count method

 

raynac
Partner - Creator II
Partner - Creator II
Author

Thank you ever so much!  I just switched abandoned from 'ab' to 'b' in the script and it worked like a charm!

I am very appreciative of your assistance!