ISBLANK DAX Function (Information)

Checks whether a value is blank, and returns TRUE or FALSE.

Syntax

ISBLANK ( <Value> )
Parameter Attributes Description
Value

The value you want to test.

Return values

Scalar A single boolean value.

A Boolean value of TRUE if the value is blank; otherwise FALSE.

Remarks

The comparison with blank is also possible with the “strictly equal to” operator == as shown in the two following correspondent predicates.

ISBLANK ( <expression> )  -- same result as the following line
<expression> == BLANK()   -- same result as the previous line
» 9 related articles
» 2 related functions

Examples

--  ISBLANK check that an expression is strictly equal to BLANK
--  ISBLANK (x) is an alias for x == BLANK ()
--  An empty string and 0 are not considered blank by ISBLANK
DEFINE
    VAR BlankValue = BLANK()
    VAR NumericValue = 42
    VAR ZeroValue = 0
    VAR EmptyString = ""
EVALUATE {
 ( 1, "ISBLANK ( BlankValue )", ISBLANK ( BlankValue ) ),
 ( 2, "ISBLANK ( NumericValue )", ISBLANK ( NumericValue ) ),
 ( 3, "ISBLANK ( ZeroValue )", ISBLANK ( ZeroValue ) ),
 ( 4, "ISBLANK ( EmptyString )", ISBLANK ( EmptyString ) ),
 ( 5, "EmptyString == BLANK()", EmptyString == BLANK() ),
 ( 6, "EmptyString = BLANK()", EmptyString = BLANK() )
}
ORDER BY [Value1]
Value1 Value2 Value3
1 ISBLANK ( BlankValue ) true
2 ISBLANK ( NumericValue ) false
3 ISBLANK ( ZeroValue ) false
4 ISBLANK ( EmptyString ) false
5 EmptyString == BLANK() false
6 EmptyString = BLANK() true
--  ISBLANK cannot be used with tables, it requires a scalar value
--  using it with tables forces the implicit conversion of a table
--  to a scalar value and might result in an error
DEFINE
    VAR EmptySet = FILTER ( { 1 }, FALSE )
    VAR SetWithBlank = { BLANK() }
EVALUATE {
    ( 1, "ISBLANK ( EmptySet )", ISBLANK ( EmptySet ) ),
    ( 2, "ISBLANK ( SetWithBlank )", ISBLANK ( SetWithBlank ) )
}
ORDER BY [Value1]
Value1 Value2 Value3
1 ISBLANK ( EmptySet ) true
2 ISBLANK ( SetWithBlank ) true
--  ISBLANK check that an expression is strictly equal to BLANK
--  ISBLANK (x) is an alias for x == BLANK ()
DEFINE
    MEASURE Customer[EmptyNames] =      -- Returns blanks and empty string
        CALCULATE (
            COUNTROWS ( Customer ),
            Customer[Customer Name] = BLANK ()
        )
    MEASURE Customer[BlankNames] =      -- Returns only blanks, same as == BLANK()
        CALCULATE (
            COUNTROWS ( Customer ),
            ISBLANK ( Customer[Customer Name] )
        )
EVALUATE
SUMMARIZECOLUMNS (
    Customer[Continent],
    "Customers", COUNTROWS ( Customer ),
    "Customers with empty name", [EmptyNames],
    "Customers with blank name", [BlankNames]
)
Continent Customers Customers with empty name Customers with blank name
Asia 3,658 67 34
North America 9,665 276 138
Europe 5,546 42 21

Related articles

Learn more about ISBLANK in the following articles:

Related functions

Other related functions are:

Last update: Nov 14, 2024   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

Microsoft documentation: https://docs.microsoft.com/en-us/dax/isblank-function-dax

2018-2024 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of ISBLANK? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.