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
» 8 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:

  • How to handle BLANK in DAX measures

    This article describes a counterintuitive behavior of BLANK in DAX measures affecting Power BI, Analysis Services, and Power Pivot. That behavior could cause mistakes in a report using alternate expressions of the same calculation. Indeed, these expressions are not equivalent when BLANK is involved. » Read more

  • Handling BLANK in DAX

    The blank value in DAX is a special value requiring particular attention in comparisons. It is not like the special null value in SQL, and it could appear in any conversion from a table expression. This article explores in details the behavior of the blank value in DAX, highlighting a common error in DAX expressions […] » Read more

  • Check Empty Table Condition with DAX

    In DAX there are different ways to test whether a table is empty. This test can be used in complex DAX expressions and this short article briefly discuss what are the suggested approaches from a performance perspective. » Read more

  • Hiding future dates for calculations in DAX

    This article describes how to write DAX measures that compute aggregations or comparisons with past dates without showing or comparing future dates. » Read more

  • Optimizing conditions involving blank values in DAX

    This article describes how blank values considered in a DAX conditional expression can affect its query plan and how to apply possible optimizations to improve performance in these cases. » Read more

  • From SQL to DAX: Implementing NULLIF and COALESCE in DAX

    This article describes how to implement a syntax equivalent to the T-SQL function NULLIF and the ANSI SQL function COALESCE, in DAX. » Read more

  • The COALESCE function in DAX

    COALESCE is a DAX function introduced in March 2020. This article describes the purpose of COALESCE and how to simplify DAX expressions by removing verbose conditions, and yet obtain the same result. » Read more

  • Preparing a data model for Sankey Charts in Power BI

    This article describes how to correctly shape a data model and prepare data to use a Sankey Chart as a funnel, considering events related to a customer (contact, trial, subscription, renewal, and others). » Read more

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.