Calculating percent from summed columns in report footer

  • I have a report that sums cesarean deliveries by doctor. in the report I was able to right click the column and insert total. I added a count to the row to get my delivery count. I have a percent column to the right of the total deliveries and total c-secs. I was able to calc the percentage in the datasource(stored proc) ((CESAREAN_DELIVERY*100)/NULLIF(TOTAL_DELIVERIES,0)) AS CESAREAN_PRCNT,

    I would like to do the following;

    1.display the percentage in the report as an actual percent. right now it displays as

    TOTAL DELIVERIES CESAREAN DELIVERIES % C-SECS

    3 1 33

    When I format the number to a percent under text box properites it displays as 3300.00%. I tried to change my calc in the stored proc, the decimal places in the format. not working.

    2.I would like to create an PRECENTAGE expression of the sums of TOTAL DELIVERIES and C-SECS. it doesn't calculate correctly for me.

    =(Sum(Fields!TOTAL_DELIVERIES.Value, "DataSet1")/Sum(Fields!CESAREAN_DELIVERY.Value, "DataSet1")) it displays as 3.47368421052632. if I format the number to 2 decimal places it will display as 3.47. if I format it as a percentage it displays as 347.37?????

    how do I get the percentage to display correctly????

  • The display formats expect a weighted percentage to be between 0 and 1. I.e. if you want 10% to show in SSRS, then you pass the value 0.1

    In Q1 you multiply by 100, hence when you format the field, it is 100 time to big.

    In Q2 you flipped the divisor and the dividend, assuming ceasrean is a subset of total births.

Viewing 2 posts - 1 through 1 (of 1 total)

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