Number.Round

Number

Rounds a number to a specified number of digits.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

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

Parameters

NameTypeRequiredDescription
numbernumberYesThe number to round.
digitsnumberNoNumber of decimal places (default 0).
roundingModenumberNoRounding mode (RoundingMode.Up, .Down, .AwayFromZero, .ToEven).

Return Value

numberThe rounded number.

Remarks

Number.Round rounds a number to the specified number of fractional digits. When digits is omitted it defaults to 0 (round to the nearest integer). The optional roundingMode parameter controls tie-breaking behaviour — RoundingMode.ToEven (banker's rounding) is the default.

This is commonly used to clean up calculated columns such as averages, percentages, or unit conversions where excessive decimal places are not meaningful.

Examples

Example 1: Round salary in thousands to 1 decimal

Table.AddColumn(
    Table.SelectColumns(Table.FirstN(Employees, 4), {"FullName", "Salary"}),
    "SalaryK", each Number.Round([Salary] / 1000, 1), type number
)
Result
FullName
Salary
SalaryK
1alice smith55,00055
2BOB JONES95,00095
3Charlie Brown72,00072
4diana PRINCE68,00068

Example 2: Round product prices to nearest ten

Table.AddColumn(
    Table.SelectColumns(Table.FirstN(Products, 5), {"ProductName", "Price"}),
    "RoundedPrice", each Number.Round([Price], -1), type number
)
Result
ProductName
Price
RoundedPrice
1Widget A2520
2Gadget B5050
3Widget C1520
4Gadget D7580
5Thingamajig E120120

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks