Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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.

 

 

 

 

1 Solution

Accepted Solutions
agigliotti
Partner - Champion
Partner - Champion

maybe this:

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

I hope it can helps.

View solution in original post

1 Reply
agigliotti
Partner - Champion
Partner - Champion

maybe this:

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

I hope it can helps.