Percentage Truncation


  • In the report layout I have some fields that tell me a percentage of transaction that perform in less the five seconds. The expression is...


    Code Snippet

    =Count(iif(Fields!Elapsed.Value <= "5", 1, nothing))/Count(Fields!Elapsed.Value)


    I used a format for percentage of P5 which will take out the numbers to the right of the decimal five places. What I want is to take it out to two places by truncating the last 3 digits. The reason for this is that when you use P2, it rounds it the value. For example, 99.99876% becomes 100.00%. This would not be a correct calc because if even out of a million transactions, if one comes in over 5 seconds, then it technically isnt 100.00%, So basically it should come in at something like 99.99.


    My question is how to trunc those last 3 (or more) trailing number so I could get a more accurate performance reading. Any suggestions?


    Thanks much.

    Thursday, July 19, 2007 8:41 PM