SSRS expression - if the value is zero, then instead of 0 instead of 0

I saw a few examples, but I just can't figure it out for my case. My expressions summarize all the values ​​from a field Totalfrom a dataset AutoDeliveryCount. I need to refer to a dataset since I use several fields Totalin my report. If a stored procedure returns NULL, how can I get 0 in my expression instead of empty?

=Sum(Fields!Total.Value, "AutoDeliveryCount")
+4
source share
5 answers
=IIf(IsNothing(Sum(Fields!Total.Value, "AutoDeliveryCount"))=True, 0, Sum(Fields!Total.Value, "AutoDeliveryCount"))
+11
source

0 . (Fields! Yourfield.Value, 2), 0.00. .

+2

Another option would be to use the Format property for the corresponding cell. For example, if you show an integer, you can format it as:

#,##0

This will display 0 if the value is null / empty.

0
source

I tried this formula in 2017 and it worked for me:

=IIF(Sum(Fields!Total.Value)=Nothing, 0, Sum(Fields!Total.Value, "AutoDeliveryCount"))
0
source

Simply:

=Sum(Fields!Total.Value, "AutoDeliveryCount") + 0
0
source

All Articles