Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to supress when value is null for an expression

I have the following trellis chart with two dimensions (Year and Superclass).  I have ticked the box to 'Suppress when value is null' for both Dimensions.

In the chart below, I would like to only show the Superclasses (subjects) when there is data for the expression that shows in the chart as a bar. I want to supress the dimensions when the value of this expression is Null.

I have a number of expressions in the chart and because the expression shown below as a line symbol always has a value, the supressing of the Dimension doesn't work.  Is there a way to suppress the expression?

5 Replies
Anonymous
Not applicable
Author

Hi,

The line can only be suppressed when all the expressions of that value of the dimension is "null". My work around for this situation is to make the rest of the expression all "null" (your case, the expression with Line symbol) when the expression you need display is "null".

Still do not see any other solution for this requirement.

Zhihong

Anonymous
Not applicable
Author

Not sure I understand.  How do I make the rest of the expression all null?

rubenmarin

Hi Greg, as you have checked already the 'Supress when value is null works for dimensions', in case you have student not realted with any year they will be counted in the null() year, that option is to avoid this behaviour (null in dimension)

For removing the dimension when there is no bar: the default behaviour is to hide dimension values when none of the expressions returns a value, or when all are zeros, so you can add an if condition that first checks if the bar expression is different than null or zero and in that case calculate this % expression.

The option to hide nulls and zeros in expressions is on the presentation tab.

stigchel
Partner - Master
Partner - Master

Maybe you can use a Rank as dimension?

See also:

Getting the most out of a Trellis bar chart, some tricks

Anonymous
Not applicable
Author

Hi, Greg,

For example, the bar expression is Expression1, the line expression is Expression2, you use Expression3 as below to replace Expression2:

If( isnull(Expression1) or Expression1=0,  0, Expression2)

In this way, Expression3 will be 0 if Expression1 is 0 or 'null', and then can be suppressed.

Zhihong