IF.EAGER is a DAX function that evaluates a condition and returns one value if TRUE and another if FALSE, using an eager execution plan.
Syntax
IF.EAGER(
LogicalTest,
ResultIfTrue,
ResultIfFalse
)
IF.EAGER is a DAX function that evaluates a condition and returns one value if TRUE and another if FALSE, using an eager execution plan.
IF.EAGER(
LogicalTest,
ResultIfTrue,
ResultIfFalse
)
Either value_if_true
, value_if_false
, or BLANK
.
The IF.EAGER function can return a variant data type if value_if_true and value_if_false are of different data types, but the function attempts to return a single data type if both value_if_true
and value_if_false
are of numeric data types. In the latter case, the IF.EAGER function will implicitly convert data types to accommodate both values.
For example, the formula IF.EAGER(<condition>, TRUE(), 0)
returns TRUE
or 0, but the formula IF.EAGER(<condition>, 1.0, 0)
returns only decimal values even though value_if_false
is of the whole number data type. To learn more about implicit data type conversion, see Data types.
IF.EAGER has the same functional behavior as the IF function, but performance may differ due to differences in execution plans. IF.EAGER(<logical_test>, <value_if_true>, <value_if_false>)
has the same execution plan as the following DAX expression:
VAR _value_if_true = <value_if_true>
VAR _value_if_false = <value_if_false>
RETURN
IF (<logical_test>, _value_if_true, _value_if_false)
Note: The two branch expressions are evaluated regardless of the condition expression.
See IF Examples.
Other functions related to IF.EAGER are:
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy