RDL - Understanding the Round function

Swa1209 90 Reputation points
2024-01-23T15:09:05.4933333+00:00

Hi, What does the "3" in the following RDL code mean: ROUND(durationMetricvalue / 1000000, 3) AS responseTime? I am trying to understand the function and its meaning. Thanks in advance

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,061 questions
0 comments No comments
{count} votes

Accepted answer
  1. ZoeHui-MSFT 41,491 Reputation points
    2024-01-24T01:46:10.9533333+00:00

    Hi @Sutheswaran, Suwhathi,

    ROUND ( numeric_expression , length)
    
    

    numeric_expression

    Is an expression of the exact numeric or approximate numeric data type category.

    length

    Is the precision to which numeric_expression is to be rounded. length must be an expression of type tinyint, smallint, or int. When length is a positive number, numeric_expression is rounded to the number of decimal positions specified by length. When length is a negative number, numeric_expression is rounded on the left side of the decimal point, as specified by length. So the "3" means rounded to the number(3) of decimal positions. Regards, Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Michael Taylor 60,161 Reputation points
    2024-01-23T18:40:21.2033333+00:00

    I believe the documentation you're looking for his here. As discussed there the first argument is the value to round. The second argument is the # of digits after the decimal. So given the value of 3 the value will be rounded to the thousandths (3 places). Example: 1234.56789 would round to 1234.568. Note that rounding rules are an optional third argument if you want to use different rules.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.