Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
It may be a simple question but I am struggling to find the answer, What I want to do, is to assign a variable based upon a selection in my chart i.e. if(Sum(Data)>=0,Sum(Data) and myVar = 'Positive' )
Can anyone take a minute to assist?
Cheers
Chris
Hi Chris,
You mean like this: if(sum(Data) >= 0, 'positive', 'negative').
If you can provide details, like a sample qvw and the required result, it may be clearer.
Hi,
Thanks so much for your help. I have attached a small sample file.
The idea is, when I click on the cyclic group button in the bottom left of the graph, the variable (myVar) is populated with the appropriate value ('positive' or 'negative').
Actually, the expression cyclic group is not controllable (like the dimension cyclic that can be controlled by the function GetCurrentField() to know which field is selected within the group).
So the attached file may be a workaround.
I added a flag (variable vFlag) to select whether to display positive or negative values (2 text boxes with an action trigger) and then the variable myVar can be set accordingly (the 3rd text box that reads the content of variable myVar).
The pie chart expressions are also displayed based on the selection of "positive" or "negative" from the conditional property.
Hope this helps
Ahhhh, a very nice work around!
Unfortunate though that this limitation on cyclic groups exists in Qlikview. None the less, your solution solves my problem to a tee.
Thanks so much Jean-Pierre!