CEILING
A number rounded up to a multiple of a significance.
Group: Math. Compatible with DAX.
Syntax
CEILING ( <number>, <significance> )
| Parameter | Type | Description |
|---|---|---|
number | Number | The number to take up to a multiple. |
significance | Number | The 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 andCEILING ( -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.CEILINGtakes 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]
| Crates | Places |
|---|---|
| 7 | 8 |
| 12 | 16 |
| 30 | 32 |
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 -1 | 1.234 by 0.05 |
|---|---|---|---|
| 5 | -4 | -5 | 1.25 |