Monday 26 May 2014

SSRS calculate percentage of column based on row total

For Row:

To get a Percentage of on row based on total of the particular column.

For e.g: Below is an image i pasted hoping I could explain my issue a lot clearer.




 in col5 right click and write the expression like this

=FORMAT((Fields!Col4.value)/SUM(Fields!Col4.value,"YourGroupName"),"p")

so that will be 10/150=0.66 and multiply by 100

so 0.66 * 100 =6.7%.

I am putting some screenshot for your help.

 

For Column:


Looking to add a column in my SSRS which will give me the percentage from the total column in that row.

I'm using the following expression, but keep getting 100% for my percentages (I'm assuming this is because the total is evaluated last, so it's just doing Total/Total?

=FORMAT((Fields!ID.Value/SUM(Fields!ID.Value,"Group Name")), "P")
 
enter image description here 

I hope this post will help you and all the best.


Regards,
Sathish

No comments:

Post a Comment