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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rsdhavle
Creator III
Creator III

Controlling two conditions in a same table chart by button

I have one straight table chart in which i have applied condition on each expression lets say if the value is greater than 50% then only display the value and corresponding row. Now suppose i have introduced two buttons when i click on one button this condition should get applied on the straight table and when i click on another button the same straight table should show all the values. How can it be done?

Note: I want to do it in a single object and not by using two objects and controlling it on a button

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Create a variable vUseCondition and give it the value -1 (=True). Add a Set Variable action to your button to set the value of the variable to =not $(vUseCondition).

Modify your original chart expressions to something like:

=if( $(vUseCondition), if(sum(Value)>0.5, sum(Value)), sum(Value)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Create a variable vUseCondition and give it the value -1 (=True). Add a Set Variable action to your button to set the value of the variable to =not $(vUseCondition).

Modify your original chart expressions to something like:

=if( $(vUseCondition), if(sum(Value)>0.5, sum(Value)), sum(Value)


talk is cheap, supply exceeds demand
rsdhavle
Creator III
Creator III
Author

Thanks , it worked.