Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
ajater2012
Contributor
Contributor

replace null with zero with sum

 

I have a simple question, I added to sum values and some of the result are null and I want to replace null with zero,

I tried this code but it shows all values as null:

 

      If(IsNull(Sum(v1) + sum(v2)), 0)

 

any help will be appreciated.

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
agigliotti
MVP
MVP

maybe this:

=Sum( if( IsNull(v1), 0, v1 ) )
+
Sum( if( IsNull(v2), 0, v2 ) )

I hope it can helps.

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it

View solution in original post

1 Reply
agigliotti
MVP
MVP

maybe this:

=Sum( if( IsNull(v1), 0, v1 ) )
+
Sum( if( IsNull(v2), 0, v2 ) )

I hope it can helps.

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it