<!-- https://learnsql.cpetoday.com/functions/dax/rounddown -->
# ROUNDDOWN

Language: DAX
Category: Math
Syntax: ROUNDDOWN(<number>, <num_digits>)
Summary: Rounds a number down, toward zero, to a set number of digits.
Returns: A number (a scalar).
Level: Beginner
Related: ROUND, ROUNDUP, INT, TRUNC, FLOOR, DIVIDE

## What it does
ROUNDDOWN always rounds toward zero. For a positive number, that means down. It is useful when an estimate should be conservative, or when only whole units are payable and any fraction must be dropped. ROUNDDOWN is the counterpart of ROUNDUP.

## Syntax and arguments
- number: the value to round down.
- num_digits: the number of decimal places to keep. 0 gives a whole number. A negative value rounds down to tens, hundreds or thousands.

## Example
The FP&A team sets a conservative revenue forecast for the board. Forecast revenue is rounded down to the nearest thousand dollars, so the stated figure never overstates what is expected.

```dax
Forecast For Board = ROUNDDOWN([Forecast Revenue], -3)
```

A forecast of 1,234,567 dollars is shown as 1,234,000. The rule is easy to explain to the board, and the figure is never higher than the model.

## Example: a second, different use
Whole full-time equivalents that can be funded from a fixed budget, where a part-time fraction cannot be paid:

```dax
Fundable Positions = ROUNDDOWN([Budget Hours] / [Hours Per Position], 0)
```

The result is the number of complete positions the budget covers. The leftover hours are not enough to hire anyone.

## Things to watch
- ROUNDDOWN moves a negative number toward zero, so -2.7 becomes -2. That is not the same as the floor of a negative number, which is -3. Use INT for the mathematical floor.
- A rounded total can differ from the sum of rounded rows. Decide which one the report shows.
- Rounding to thousands is a display choice. Keep the precise value in the model when other calculations depend on it.
- Dropping cents when the figure is money can hide a small error. Check the rule with the controller.
- For a truncation that never rounds, TRUNC is the same idea for positive numbers, but TRUNC is clearer when you mean "remove the digits."

## In business terms
ROUNDDOWN is the rule for conservative forecasts, funded positions, whole-unit purchasing and any amount that the business cannot pay beyond what is available. Write the rule down in the model documentation so the board and the auditor read it the same way.
