Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm trying to figure out how to total values from a calculated field.

In the example below, I have the following expression:

=IIF(Fields!Role.Value = "Contractor", Fields!actualwork.Value * 100,
Fields!actualwork.Value * 77)

Now I want to provide a total, but it doesn't show up on the report. Is there something I'm missing?


share|improve this question
Have you looked into SUM function or CountRows (msdn.microsoft.com/en-us/library/ms156330(v=sql.100).aspx). That should help you. –  Kin Nov 11 '13 at 16:27

2 Answers 2

You actually just put a SUM around the outside:

=Sum(IIF(Fields!Role.Value = "Contractor", Fields!actualwork.Value * 100,
Fields!actualwork.Value * 77))

It will evaluate that row by row and will provide the correct sum.

share|improve this answer

Try casting it to type double, like this: =SUM(CDbl(Fields!YourField_f.Value))

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.