Power BI DAX Logical Functions (original) (raw)

Last Updated : 5 Sep, 2025

Data analysis expressions or DAX, are formulas or expressions used in calculations and data analysis. It is a previously written formula that performs calculations using input values to give the desired outcomes. A column reference, numbers, text, constants, references to other formulas or functions and logical values like TRUE or FALSE are all acceptable function arguments. We know look at DAX Logical Functions:

In order to study these functions, you may look at the data. Below is the screenshot of the dataset:

You can download dataset from here.

dataset

**1. IF

A condition is checked and if it is TRUE, one value is returned; otherwise, a different value is returned.

**Syntax: IF(<logical_test>, <value_if_true>[, <value_if_false>])

**Example:

If-logical-function

2. AND

The function determines whether both arguments are TRUE and returns TRUE if they are. If not, returns false.

**Syntax: AND(,)

**Example:

and-logical-function

3. COALESCE

Identifies the first expression that is not BLANK and returns it. BLANK is returned if all expressions evaluate to NULL.

**Syntax: COALESCE(, [, ]…)

**Example:

coalesce-logical-function

**4. IFERROR

Returns the value of the expression itself unless the expression returns an error, in which case it returns a specified value.

**Syntax: IFERROR(value, value_if_error)

**Example:

iferror-logical-function

5. NOT

This function converts either FALSE or TRUE values into the other.

**Syntax: NOT()

**Example:

not-logical-function

6. OR

Returns TRUE if one of the arguments is verified to be TRUE. If both arguments are false, the function returns FALSE.

**Syntax: OR(,)

**Example:

or-logical-function

**7. SWITCH

Returns one of several potential result expressions after comparing an expression to a list of values.

**Syntax: SWITCH(, , [, , ]…[, ])

**Example:

switch-logical-function

Below is the List of all Logical DAX Functions in PowerBI:

Function Description Syntax
IF A condition is checked and if it is TRUE, one value is returned; otherwise, a different value is returned. IF(<logical_test>, <value_if_true>[, <value_if_false>])
IF.EAGER If the condition is true, the check returns one value; if not, a different value is returned. The branch expressions are always executed regardless of the condition expression thanks to the eager execution plan that is used. IF.EAGER(<logical_test>, <value_if_true>[, <value_if_false>])
IFERROR Returns the value of the expression itself unless the expression returns an error, in which case it returns a specified value. IFERROR(value, value_if_error)
AND The function determines whether both arguments are TRUE and returns TRUE if they are. If not, returns false. AND(,)
BITAND The output of this function is the bitwise AND of two numbers. BITAND(, )
BITLSHIFT Returns a number with the specified number of bits shifted to the left. BITLSHIFT(, <Shift_Amount>)
BITOR It provides a bitwise OR of two numbers as a result. BITOR(, )
BITRSHIFT Returns a number with the specified number of bits shifted to the right. BITRSHIFT(, <Shift_Amount>)
BITXOR It provides a bitwise XOR of two numbers as a result. BITXOR(, )
COALESCE Identifies the first expression that is not BLANK and returns it. BLANK is returned if all expressions evaluate to NULL. COALESCE(, [, ]…)
FALSE The logical value FALSE is returned by this function. FALSE()
TRUE The logical value TRUE is returned by this function. TRUE()
NOT This function converts either FALSE or TRUE values into the other. NOT()
OR Returns TRUE if one of the arguments is verified to be TRUE. If both arguments are false, the function returns FALSE. OR(,)
SWITCH Returns one of several potential result expressions after comparing an expression to a list of values. SWITCH(, , [, , ]…[, ])