Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Blessed1978
Yak Posting Veteran
97 Posts |
Posted - 2014-03-19 : 11:02:37
|
I wrote the following SSRS expression to get percentageI need to roud my results to the mearest hundreath. It is currently returning values as 1245% etc I want to round it to 12% =sum(Fields!Sales.Value, 2)/Sum(Fields!Sales.Value,"DataSet1") * 100 |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2014-03-19 : 17:00:49
|
You can use the format string "P" to format as percentage - which by default rounds to two decimal digits. I didn't quite follow how the example of 1245 percent becoming 12 percent correlates with your statement that you want to round to the nearest hundredth of a percentage. |
|
|
maunishq
Yak Posting Veteran
71 Posts |
Posted - 2014-03-20 : 12:48:16
|
It should be =sum(Fields!Sales.Value, 2)/Sum(Fields!Sales.Value,"DataSet1")and now you can select % from the toolbar menu, so it will be 12.45% and if you do not want the decimals then make it 0 decimals.So the end result you would have would be 12.=======================Not an Expert, Just a learner.!_(M)_! |
|
|
|
|
|