Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anuhyak1
Creator
Creator

Conditional show hide expressions in stacked bar chart by clicking on corresponding buttons

I have two dimension one is 'serious' and other is significant and months in stacked bar chart

Expressions for Count on (Serious) Yes,No,Unable to determine

Expressions for Count on (Significant) Yes,No


When user clicks on Initial cases button it would show only Initial cases Where Seriousness = 'Yes' or 'No'

When user clicks on Followup cases button it would show only Followup cases Where Siginificant = 'Yes' or 'No'(The bar graph expression replace Seriousness with Significant expressions)

When user clicks on Initial+Followup button it would all the cases Where Seriousness = 'Yes' or 'No' and Siginificant = 'Yes' or 'No' How do we set it up in expressions?

1 Reply
edwin
Master II
Master II

one way to implement this is to create two variables:

vSignificantValues and vSeriousValues

add the following expressions where it is needed Serious={$(vSeriousValues)}, Significant={$(vSignificantValues)}
example:  count({<Serious={$(vSeriousValues)}, Significant={$(vSignificantValues)}>} cases)

then for each button set the variables. "When user clicks on Initial+Followup button it would all the cases Where Seriousness = 'Yes' or 'No' and Siginificant = 'Yes' or 'No' How do we set it up in expressions?"

for this button create action where you set both variables vSeriousValues and vSignificantValues to chr(39)&'Yes'&chr(39)&','& chr(39)&'No'&chr(39) 

this will result in the expression count({<Serious={'Yes','No'}, Significant={'Yes','No'}>} cases)

to make it simple, create 3 expressions with the set analysis modifiers and just hide show them depending on the button pressed.