OpenBI Docs Buy

CEILING

A number rounded up to a multiple of a significance.

Group: Math. Compatible with DAX.

Syntax

CEILING ( <number>, <significance> )
ParameterTypeDescription
numberNumberThe number to take up to a multiple.
significanceNumberThe multiple to round to, such as 1, 0.05 or 8.

Returns

Number. The number rounded up to a multiple of the significance (see the remarks for negative numbers).

Remarks

  • With a positive significance the number goes up, towards plus infinity: CEILING ( 4.3, 1 ) is 5 and CEILING ( -4.3, 1 ) is -4.
  • A negative number with a negative significance goes away from zero instead: CEILING ( -4.3, -1 ) is -5.
  • A positive number with a negative significance is an error. ISO.CEILING takes no notice of the significance's sign and always goes up.
  • A significance of 0, or a blank one, gives 0. A blank number gives BLANK.
  • Prices to the next 5 cents: CEILING ( 1.234, 0.05 ) is 1.25.

Examples

Places on pallets of 8

Crates rounded up to whole pallets.

EVALUATE
ADDCOLUMNS ( DATATABLE ( "Crates", INTEGER, { { 7 }, { 12 }, { 30 } } ), "Places", CEILING ( [Crates], 8 ) )
ORDER BY [Crates]
CratesPlaces
78
1216
3032

Negative numbers

EVALUATE
ROW (
    "4.3 by 1", CEILING ( 4.3, 1 ),
    "-4.3 by 1", CEILING ( -4.3, 1 ),
    "-4.3 by -1", CEILING ( -4.3, -1 ),
    "1.234 by 0.05", CEILING ( 1.234, 0.05 )
)
4.3 by 1-4.3 by 1-4.3 by -11.234 by 0.05
5-4-51.25

ISO.CEILING, FLOOR, MROUND, ROUNDUP.

Last updated · OpenBI Studio 0.3.74