Power QueryExercises

Number.Round

Number function · By Tahir Nas · Examples run in our simulator · Published · Updated

Rounds a number to a number of digits.

When to use it

Use it when values are displayed or compared at a fixed precision, such as money to 2 decimals. Choose the rounding mode deliberately: the default rounds halves to even, which differs from Excel's ROUND.

Syntax

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

Parameters

roundingMode
RoundingMode.ToEven (default), AwayFromZero, Up, Down, TowardZero.

Returns

The rounded number.

Example

Number.Round(2.5, 0, RoundingMode.AwayFromZero)

Result

3

Example: banker's rounding by default

Without a mode, 2.5 rounds to 2 and 3.5 to 4.

Text.Combine(List.Transform({Number.Round(2.5), Number.Round(3.5)}, Text.From), ", ")

Result

2, 4

Both results are produced by the Power Query Exercises simulator, an independent implementation of a documented subset of M, and checked on every build.

Good to know

Common mistakes

The matching command in Excel

Excel for Windows
Add Column > Rounding > Round
What you see
The rounded values go in a new column; Transform > Rounding changes the column in place.

Paths are for the Power Query editor in Excel for Microsoft 365, checked against Microsoft's documentation on 8 November 2026: Add a column based on a data type (Power Query) (Microsoft Support).

Exercises that use Number.Round

Learn more

Related functions

Official documentation: Number.Round on Microsoft Learn.