I am using SSRS 2008 and am trying to write a summary expression:
=iif(Fields!contact_type.Value = "Face to Face",sum(Fields!duration.Value),0) /
sum(Fields!duration.Value)
But when I view this result in the table, the result is not equal to correct value. How do I formulate this so that it calculates the total duration for “Face to FAce” records divided by total duration for all records?
I tried this expression now in SSRS 2008 BIDS:
=sum(Fields!F2F_duration.Value) / sum(Fields!duration.Value, "NC60percentGrid")
where NC60percentGrid is the name of my dataset, but the total is still not correct.
You need to specify the scope. See more here: http://blogs.technet.com/b/mat_stephen/archive/2005/05/26/405407.aspx
Edit
Try moving your IIF inside of the SUM (as opposed to the other way around). Give this a shot: