Solved

# SSRS Subtotal to exlude rows with a blank field

Posted on 2011-10-26
Medium Priority
462 Views
I'll do my best to explain my situation. I have an ssrs report that calculations utilization per associate. Utilization is the total time spent on inbound and outbound calls divided by hours worked. My issue is that an associate may have hours worked, but may not have any inbound or outbound calls that day. So I do not want to include these hours in the subtotal utilization field. The code and screenshot are below. For instance, Grace Eliasen subtotal shoudl be 154%, not 77%.
``````=(sum(Fields!Inbound_Connect.Value)+sum(Fields!outbound_Connect.Value)+sum(Fields!Inbound_Waiting.Value)+sum(Fields!outbound_Waiting.Value)+sum(Fields!Inbound_ACW.Value)+sum(Fields!outbound_ACW.Value)+sum(Fields!Inbound_Deassign.Value)+sum(Fields!outbound_Deassign.Value))/(sum(Fields!hoursworked.Value)*60*60)
``````
0
Question by:dplowman

LVL 10

Accepted Solution

itcouple earned 2000 total points
ID: 37036410
Hi

You can do conditional SUM I think it goes like that

=SUM(IIF(Fields!MyField.Value = "I do not want you", nothing, Fields!FieldtoSum.Value)

Regards
Emil
0

Author Closing Comment

ID: 37038782
Thanks for the help. I altered the formula a bit, here is the result!

=iif(Fields!Inbound_Calls.Value+Fields!outbound_Calls.Value = 0, 0, (sum(Fields!Inbound_Connect.Value)+sum(Fields!outbound_Connect.Value)+sum(Fields!Inbound_Waiting.Value)+sum(Fields!outbound_Waiting.Value)+sum(Fields!Inbound_ACW.Value)+sum(Fields!outbound_ACW.Value)+sum(Fields!Inbound_Deassign.Value)+sum(Fields!outbound_Deassign.Value))/sum(iif(((Fields!Inbound_Calls.Value)+(Fields!outbound_Calls.Value)) = 0,nothing, (Fields!hoursworked.Value)*60*60)))
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Integration Management Part 2
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
###### Suggested Courses
Course of the Month15 days, 10 hours left to enroll