Search code examples
reporting-servicesrdlc

SSRS RDL SUM IF expression


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!


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))