Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

niccolo24
New Contributor II

Show expression if variable different from null

Hi,

i have created some variables on which I want an expression to be calculated. Now, I only want to show that expression in the chart if the variable is different from null (basically if i have selected some inputs for that variable). [ I actually have 10 variables that appear in the chart]

Which expression should i put in the Conditional field of the expression?

Tx

2 Replies
Or
Valued Contributor II

Re: Show expression if variable different from null

Assuming both null() and blank string ( '' ) are considered empty, you can use:

Len(VariableName)>0

If you need it to explicitly be null, you should be fine with:

If(Isnull(VariableName),0,1)

Or something along those lines.

Good luck.

Not applicable

Re: Show expression if variable different from null

Try this:

if( len(variable) = 0, 'true')

Replace Variable with your variable name and replace 'True' with your expression.

Community Browser