Number.RoundUp

Number

Rounds a number up away from zero (ceiling).

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

Syntax

Number.RoundUp(number as nullable number, optional digits as nullable number) as nullable number

Parameters

NameTypeRequiredDescription
numbernumberYesThe number to round up.
digitsnumberNoNumber of decimal places (default 0).

Return Value

numberThe number rounded up to the specified precision.

Remarks

Number.RoundUp always rounds away from zero, increasing the magnitude of the number. When digits is omitted it defaults to 0, producing the next integer up. This behaves like a ceiling function for positive numbers.

A common use case is estimating resource needs — for example, rounding up the number of shipping boxes required so you never under-allocate.

Examples

Example 1: Round up average price per unit to whole number

let
    AvgPrice = List.Average(Table.Column(Sales, "UnitPrice")),
    Rounded = Number.RoundUp(AvgPrice)
in
    #table({"AvgUnitPrice", "RoundedUp"}, {{AvgPrice, Rounded}})
Result
AvgUnitPrice
RoundedUp
146.8847

Example 2: Round up quantities to the nearest five

Table.AddColumn(
    Table.SelectColumns(Table.FirstN(Sales, 4), {"Product", "Quantity"}),
    "BatchQty", each Number.RoundUp([Quantity] / 5) * 5, type number
)
Result
Product
Quantity
BatchQty
1Widget A45
2Gadget B25
3Widget C1010
4Gadget D15

Compatibility

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