SQLTeam.com | Weblogs | Forums

Expression for Calculated Percentage - Report Builder 3.0


I'm new to Reporting Services and need some help with expressions. My problem is this.

I have a Matrix table with two calculated columns of data where the values are both expressed in hh:mm. I need to include a 3rd column that calculates a percentage (A / B)*100. The expressions that populate each calculated field are shown below, with an example of the field value that is being displayed - as a new User I'm unable to attach real examples.

Col A (Time Spent)
=int(sum(Fields!Time_Spent_Minutes.Value * 60)/3600) & ":" & int((sum(Fields!Time_Spent_Minutes.Value * 60) Mod 3600)/60)

Col B (Technician Availability)
=Lookup(Fields!Support_Rep.Value, Fields!Support_Rep.Value, Fields!Field12.Value, "DataSet2")

Col A Col B
153:27 173:20

Hopefully, someone will be able to point me in the right direction - I've tried combining the two expressions, and also combining a shortening the Col A expression (sum(Fields!Time_Spent_Minutes.Value) but they both display an #error.


Thought I'd update my own post as I managed to find a work around for this problem. The issue was being created by trying to work with inconsistent data types. Once these data types were addressed at source, the issue disappeared and normal calculations were possible.