EVEN
A number rounded away from zero to an even whole number.
Group: Math. Compatible with DAX.
Syntax
EVEN ( <number> )
| Parameter | Type | Description |
|---|---|---|
number | Number | The number to take to an even whole number. |
Returns
Number. The nearest even whole number, going away from zero.
Remarks
- It goes away from zero: 1.5 becomes 2, 3 becomes 4 and -1 becomes -2. An even whole number stays as it is.
- 0 stays 0, and a blank gives BLANK.
- Text holding a number is read as that number.
Examples
Up to the next even number
EVALUATE
ROW (
"1.5", EVEN ( 1.5 ),
"3", EVEN ( 3 ),
"2", EVEN ( 2 ),
"-1", EVEN ( -1 ),
"Blank", EVEN ( BLANK () )
)
| 1.5 | 3 | 2 | -1 | Blank |
|---|---|---|---|---|
| 2 | 4 | 2 | -2 | (blank) |