Percentage SSRS

可紊 提交于 2019-12-12 03:19:16

问题


I have two text boxes in my SSRS report.

The Total Number is simply - =COUNT(Fields!CommunicationId.Value) The First Call Resolutions = =SUM(Fields!FirstCallResolution.Value)

The FirstCallResolution simply has a 1 for when it is a first call resolution and a 0 when it is not.

What would the expression be to get this to show the % correctly in SSRS?

Thanks

Edit : format code


回答1:


You can do calculations in your expressions. Try

=(SUM(Fields!FirstCallResolution.Value) / COUNT(Fields!CommunicationId.Value)) * 100




回答2:


If you looking for a precision and a percentage representation., you can also write the below expression in the text box where you want the result to be displayed.

=(SUM(Fields!FirstCallResolution.Value) / COUNT(Fields!CommunicationId.Value)) 

You can then do a custom formatting for this text box in the Text-Box properties. Right click on Text Box --> Text Box Properties --> Number-->Custom, and enter P1 or P2 or P3 and so on for number of decimal places after the decimal point.




回答3:


You can also use the Round function in your expression. With this function =ROUND(...,1) you'll get one number after the decimal point. If you want two numbers after the decimal point then use 2 instead of 1, and so on.

=Round(((SUM(Fields!FirstCallResolution.Value) / COUNT(Fields!CommunicationId.Value)) * 100),1)



回答4:


Try =FORMAT((SUM(Fields!FirstCallResolution.Value) / COUNT(Fields!CommunicationId.Value)),"P")



来源:https://stackoverflow.com/questions/38762523/percentage-ssrs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!