Writing summary expression
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?Ryan D
December 8th, 2011 2:31pm
try,
=sum(iif(Fields!contact_type.Value = "Face to Face",Fields!duration.Value,0)) / sum(Fields!duration.Value)
or, they have Average function as well. hth
Free Windows Admin Tool Kit Click here and download it now
December 8th, 2011 2:49pm
That gives me an #Error. How would I construct the average function?Ryan D
December 8th, 2011 2:57pm
try
=sum(iif(Fields!contact_type.Value = "Face to Face",cdbl(Fields!duration.Value),cdbl(0))) / sum(cdbl(Fields!duration.Value))
Free Windows Admin Tool Kit Click here and download it now
December 8th, 2011 2:58pm
Awesome! This worked! Thank you!Ryan D
December 8th, 2011 3:19pm