Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a graph and i need to show expression according to the choice of the user buttons and list are possibilities but is there another way to do that?
Thanks in advance
Hi,
Try like this
Expression :
If(variableValue = 1, Expression1, If(variableValue = 2, Expression2, .............................))
or
Pick(variableValue, Expression1, Expression2, Expression3)
Label : If(variableValue = 1, Caption1, If(variableValue = 2, Caption2, .............................))
If you are using Qlikview 11, you can show/hide an expression based on the condition
Chart Properties -> Expression -> Select Condition and Put your condition there in textbox
Hope this helps you.
Regards,
Jagan.
From the QV helpfile:
Returns the name of the currently active field in a group.
Example
getcurrentfield( myGroup )
getfieldselections ( FieldName [, ValueSep
[, MaxValues]])
Returns a string with the current selections in a field.
ValueSep is the separator to be put between field
values. The default is ', '.
Maxvalues is the maximum number of field values to
be individually listed. When a larger number of values is selected the format 'x
of y values' will be used instead. The default is 6.
Examples
getfieldselections ( Year )
getfieldselections ( Year, '; ' )
getfieldselections ( Year, '; ' , 10 )
getcurrentselections ([RecordSep [, TagSep [,ValueSep [, MaxValues]]]])
Returns a string with the current selections in the document.
RecordSep is the separator to be put between field
records. The default is <CR><LF>.
TagSep is the separator to be put between the field
name tag and the field values. The default is ': '.
ValueSep is the separator to be put between field
values. The default is ', '.
Maxvalues is the maximum number of field values to
be individually listed. When a larger number of values is selected the format 'x
of y values' will be used instead. The default is 6.
Examples
getcurrentselections ( )
getcurrentselections ( chr(13)&chr(10) , ' = ' )
getcurrentselections ( chr(13)&chr(10) , ' : ' , ' ; ' )
getcurrentselections ( chr(13)&chr(10) , ' : ' , ' ; ' , 10
)
getselectedcount (FieldName [,
IncludeExcluded])
Returns the current number of selected values in a field.
If IncludeExcluded is true the count will include
selected values, which are currently excluded by selections in other fields. If
false or omitted these values will not be included.
Examples
getselectedcount ( Year )
getselectedcount ( Year, true( ) )
getnotselectedcount ( FieldName [,
IncludeExcluded])
Returns the current number of not-selected values in a field in a field with
AND-Mode in List
Boxes (red values in list box).
If IncludeExcluded is true the count will include
selected values, which are currently excluded by selections in other fields. If
false or omitted these values will not be included.
Examples
getnotselectedcount ( Year )
getnotselectedcount (Year,true())
Returns the current number of possible values in a field.
Example
getpossiblecount ( Year )
Returns the current number of excluded values in a field.
Example
getexcludedcount ( Year )
getalternativecount (FieldName)
Returns the current number of alternative values in a field.
Example
getalternativecount ( Year )
You can define a variable
say vVar=1(this will become 1 only when button is pressed)
In expression tick enable and give a condition for a particular expression that
if(vVar=1,your expression);
hi,
You can hide your expression conditionally according to the action of your button.
In the expression tab write your condition in conditional box.
HTH
Sushil