Question

Essentially I'm trying to sum ONLY those numbers that are greater than 0 Something like this:

       =IIF((fields!cal_varience.value)>0,sum(fields!cal_variance.Value))

any ideas?

Thanks!

Était-ce utile?

La solution

You're actually on the right track, just flip it around - put your SUM around your IF statement. For example:

=sum(iif(Fields!cal_varience.value > 0, Fields!cal_varience.value, 0))

Autres conseils

I had a similar issue. I was trying to the Min value, but exclude zeros. The above answer will work for Sum, but if you are trying to get the Min value excluding zeros then the above answer will not work. You need to use Nothing to exclude the zeros. For example:

=Min(IIF(Fields!Field_Name.Value > 0, Fields!Field_Name.Value, Nothing))
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top