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: 
rishimessi19
Contributor II
Contributor II

Handling Null Values in Expression (Sum)

Hi

I have a data set (Below Picture) with Dim and Sales as two attributes. I want to show sum in a straight table. I see that '0' is being displayed when we sum two null values. How can we display '-' when we have missing values in a sum expression?

3 Replies
swuehl
MVP
MVP

Have a look at

Re: Nulls and Zeros in SUM function

and the other referenced thread therein also.

trdandamudi
Master II
Master II

You can try below expression:

=If(Sum(Sales) = 0, '-',Sum(Sales))

HandlingNullVaues.jpg

sunny_talwar

Or may be this:

Sum(Sales) * (Avg(Sales)/Avg(Sales))