W. Hesler
W. Hesler

Reputation: 27

Custom SUMIF function in SSRS

Basically, I am trying to re-create Excels SUMIF function within the custom code section of SSRS. I have data that started coming in later than the majority of my data, and I want to perform a sum only if the data is available.

Please see the image attached:

Sample Data

I have tried many versions of a public function and I am still getting the #Error result.

Anyone have any ideas?

Upvotes: 0

Views: 1775

Answers (2)

W. Hesler
W. Hesler

Reputation: 27

It looks like my issue was that I was missing CINT() for the field values. I added them and it seems to be working fine.

Upvotes: 1

SS_DBA
SS_DBA

Reputation: 2423

In your Numerator sum field, try this.

Updated

=Sum(IIF(Fields!Denominator.Value = "", 0, Fields!Numerator.Value))

Upvotes: 0

Related Questions