ODD
A number rounded away from zero to an odd whole number.
Group: Math. Compatible with DAX.
Syntax
ODD ( <number> )
| Parameter | Type | Description |
|---|---|---|
number | Number | The number to take to an odd whole number. |
Returns
Number. The nearest odd whole number, going away from zero.
Remarks
- It goes away from zero: 1.5 and 2 both become 3, and -2 becomes -3. An odd whole number stays as it is.
- 0 becomes 1, and so does a blank.
EVENkeeps a blank blank.
Examples
Up to the next odd number
EVALUATE
ROW (
"1.5", ODD ( 1.5 ),
"2", ODD ( 2 ),
"-2", ODD ( -2 ),
"0", ODD ( 0 ),
"Blank", ODD ( BLANK () )
)
| 1.5 | 2 | -2 | 0 | Blank |
|---|---|---|---|---|
| 3 | 3 | -3 | 1 | 1 |