Saturday, February 11, 2012

#Error when trying to SUM field in dataset

I created a calculation field (Named Posted_InHouse in my dataset as such:

=IIf(Fields!Type.Value = "In-House", Fields!PostedAmount.Value, 0)

My purpose was to then be able to sum PostedAmount in my table Group field only if it comes from an In-House record.

I put this in

=SUM(Fields!Posted_InHouse.Value)

Now I get #Error in my group field when in preview

Have you tried: Cint(IIf(Fields!Type.Value = "In-House", Fields!PostedAmount.Value, 0))

I have found that sometimes you need to specifically specify the output of an iif statement.

No comments:

Post a Comment