<!-- https://learnsql.cpetoday.com/functions/dax/ceiling -->
# CEILING

Language: DAX
Category: Math
Syntax: CEILING(<number>, <significance>)
Summary: Rounds a number up to the nearest multiple of a significance value.
Returns: A number (a scalar).
Level: Intermediate
Related: FLOOR, ROUNDUP, INT, ROUND, DIVIDE, MOD

## What it does
CEILING rounds a number up to the nearest multiple of a value you choose. It is the upward counterpart of FLOOR. Where ROUNDUP works on decimal places, CEILING works on steps, such as the nearest 1,000 dollars or the next 15-minute block. Use it when a figure must be covered in full steps and a partial step still costs a full step.

## Syntax and arguments
- number: the value to round up.
- significance: the step size, such as 1000 or 15. It is required.

## Example
A department requests funding for a project. The finance team asks for the budget in whole thousands, rounding each request up so the approved amount covers the need.

```dax
Budget Request = CEILING([Required Funding], 1000)
```

A need of 48,250 dollars becomes a request of 49,000 dollars. The extra amount is a buffer that the controller can see and approve.

## Example: a second, different use
Bill a client for consulting time in whole 15-minute blocks, always rounding a partial block up:

```dax
Billed Hours = CEILING([Logged Minutes], 15) / 60
```

A time entry of 47 minutes is billed as 60 minutes, which is one full hour. Use FLOOR when the firm rounds down instead.

## Things to watch
- The significance argument is required.
- CEILING rounds up toward positive infinity for positive numbers. For negative numbers the behavior is different, so keep numbers positive or test the result.
- A rounded-up total always covers the need, but it overstates the true cost. Show the unrounded figure next to it when a reader must see the gap.
- ROUNDUP is for decimal places, CEILING is for steps. Pick the one that matches the rule.
- Round at the level of the request, not at each line, unless the policy says otherwise.

## In business terms
CEILING is used for billing increments, budget requests in round thousands, purchase quantities in full packs, and any allowance that must cover a whole step. It makes sure a plan is funded in units the approver recognizes.
