Format field to display as percent

  • Hi,

    I have a calculated field in my report that I want to be displayed as a percent. Is there a format function to do this? Here is my expression:

    =((SUM(Iif(Fields!Quality.Value="Good", Fields!Length.Value, CDec(0))))/SUM(Fields!Length.Value))*100

    Currently, I'm getting values like 95.7570440588364444444...... I need it be displayed as 95.78%.

    Any help would be appreciated.

    Thanks.

  • Never mind. I figured it out. You can use the "FormatPercent" function as follows:

    =FormatPercent(((SUM(Iif(Fields!Quality.Value="Good", Fields!Length.Value, CDec(0))))/SUM(Fields!Length.Value)),2)

  • Or you can do this also

    =((SUM(Iif(Fields!Quality.Value="Good", Fields!Length.Value, CDec(0))))/SUM(Fields!Length.Value))

    take this exp and select your filed col and click properties in format Property put P2 it will give you % sign upto two deci. places

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply