reporting services - Percentage Calculation In SSRS -


when calculating given below in ssrs 2008

=sum(iif(fields!remarks.value = "good",1,0))/((sum(iif(fields!remarks.value = "good",1,0))+ sum(iif(fields!remarks.value = "bad",1,0))))*100  getting result 34.9632565235   trying result 34.97% 

please share expertise.

thanks

try:

=format( sum(iif(fields!remarks.value = "good",1,0))/ ((sum(iif(fields!remarks.value = "good",1,0)) + sum(iif(fields!remarks.value = "bad",1,0)))),"p2") 

or can use custom string format:

=format(     sum(iif(fields!remarks.value = "good",1,0)) /     ((sum(iif(fields!remarks.value = "good",1,0)) +     sum(iif(fields!remarks.value = "bad",1,0)))*100) ,"0.00") & "%" 

let me know if helps.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -