Skip to main content
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: 
raghvendrasingh
Creator II
Creator II

how to show conditional expression in chart

Hi All,

Here I'm unable to set the conditional expression in bar chart. The situation is like this ,  if I click first button then should be shown the first expression value, and if I click second button then should be shown second expression value and if there is no selection then it should be shown all the values. How to show this in bar chart.

Please anyone give me some idea because I'm new in qlikview.

Thanks in advance.

5 Replies
alexandros17
Partner - Champion III
Partner - Champion III

set two variables in the script:

Let vExpr1=0;

Let vExpr2=0;

in each expressin write in the conditional textbox:

vExpr1=1 (in the first expr.)

vExpr2=1 (in the second expr.)

Now in the buttons (I describe only the first) add a trigger -> external -> set variables and write

in the upper box: vExpr (without equal or other signs)

in the lower write:

=if(vExpr=0,1,0)

The same in the second button

Let me know

amit_saini
Master III
Master III

Hi Raghvendra,

You can give condition here in layout table under Conditional.

Thanks,

AS

senpradip007
Specialist III
Specialist III

PFA and go to Sheet1. Hope it helps.

raghvendrasingh
Creator II
Creator II
Author

Hi Alessandro,

Thanks for your reply its working  when i click first button then it shows the first expression value but when I select second button then its showing first & second both expression values together.

alexandros17
Partner - Champion III
Partner - Champion III

there are two solution:

1) click the button one time show the expression, click the button again hide the expression (as it works now)

2) add another trigger to each button and set the other variable to 0

     trigger 1: =vExpr1=1

       trigger 2:  =vExpr2=0

in the second butto is the opposite

Let me know ...