I cannot get to round up or fix the value of my outcome to Two or one decimal places in Report Builder.
I am using Code in my Report Builder Expression:
=SUM(Fields!COMPLETE.Value)/SUM(Fields!Total.Value)*100 & "%"
After the division i get results like 26.33333415% or 37.4512654%. How can I round this up to two decimals?
I tried to to do it from the Text Box Properties setting it to 0 or 1 decimals, didn’t work. Don’t know how to round up with this.
Expected Results: 26.3% & 37.4% Or 26.33% & 37.45%
Advertisement
Answer
Use the CEILING or FLOOR functions to accomplish rounding.
=CEILING(SUM(Fields!COMPLETE.Value)/SUM(Fields!Total.Value)*100)