Number.Round Function of Power Query

The Number.Round function in Power Query returns a nullable number (n) if value is an integer.

Syntax

Number.Round(
number as nullable number, 
optional digits as nullable number, 
optional roundingMode as nullable number) 
as nullable number 

Example: Round the number 1.234 to the nearest integer.

Power Query M

let
    source = Number.Round(1.234)
in
    source  

The output of the above code is 1.

Example: Round the number 2.6 to the nearest integer.

Power Query M

let
    source = Number.Round(2.6)
in
    source 

The output of the above code is 3.

Example: Round the number 2.247 to two decimal places.

Power Query M

let
    source = Number.Round(2.247,2)
in
    source 

The output of the above code is 2.25.