Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have a chart which has three expressions. i would like to know how to conditionally view one of the three expressions on the chart when a button is selected
You can group the three expressions in the Expression tab of the properties screen. You can then select in the chart which expression should be shown. That way you don't need a button. If you want to use buttons instead you can use a variable (e.g. v_ShowExp). Add actions to the buttons to set the value of the variable (e.g set variable v_ShowExp to value 'Exp1'). The conditional display expression of the chart expression can use the variable to determine if the expression should be shown or not (e.g. for the first expression if($(v_ShowExp)='Exp1',1,0).
You can group the three expressions in the Expression tab of the properties screen. You can then select in the chart which expression should be shown. That way you don't need a button. If you want to use buttons instead you can use a variable (e.g. v_ShowExp). Add actions to the buttons to set the value of the variable (e.g set variable v_ShowExp to value 'Exp1'). The conditional display expression of the chart expression can use the variable to determine if the expression should be shown or not (e.g. for the first expression if($(v_ShowExp)='Exp1',1,0).
im new to qlikview so i need few more details
can u tell me to create a variable and assign it to a button
Open the Variable screen via the menu Settings->Variable Overview (or CTRL+ALT+V) and add the variable
Add a button and on the Actions tab add an action to the button. Choose External, Set Variable
Set the variable to the new variable you created and set the value to a string
Set the expression for the conditional display to if($(v_ShowExp)='Exp1',1,0). This checks if the value of the variable is 'Exp1'. If it is return 1 (meaning True) to show the expression, otherwise return 0 (meaning False) and hide the expression