Calulate percentages
I have two fields one called incident number and another called problem number, the incident number field will always be populated whereas the problem number field will not be. I wish to calculate the percentage of incident number fields that have the problem number field populated. Can anyone provide me with an expression that would show this? Thanks Roisin Lautman
July 29th, 2011 5:09am

Try This for Percentage Text Box =IIF((Not IsNothing(Fields!Problem.Value)) And (Fields!Problem.Value <> ""),((Fields!Incident.Value/Fields!Problem.Value) * 100),Fields!Incident.Value) Or =IIF((Not IsNothing(Fields!Problem.Value)) And (Fields!Problem.Value <> ""),((Fields!Incident.Value/Fields!Problem.Value) * 100),0) If you want 0 if Problem No is Blank then try second one the first one will return Incident number as Percent if Problem is Blank and if the values are non numeric i.e. String then use CDec(Value) to conver to Decimal -------------------------------------------------------- Surender Singh Bhadauria
Free Windows Admin Tool Kit Click here and download it now
July 29th, 2011 6:43am

Both these expressions are displaying as #Error I was thinking of trying =Sum(Fields!Problem_ID.Value)/ Count(Fields!Incident_Number.Value) could this work?
July 29th, 2011 7:10am

=Sum(IIF(IsNothing(Fields!Problem_ID.Value), 0, 1))/Count(Fields!Incident_Number.Value) may work.Remember to mark as an answer if this post has helped you.
Free Windows Admin Tool Kit Click here and download it now
July 29th, 2011 9:23am

HI RLautman, Use this IIF((isnothing(problemnumber) or (problemnumber.value=0)),0,((IncidentNumber*100)/ProblemNumber)) Hope this will help Please mark as answer if helpful Amit
July 31st, 2011 1:48pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics