Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DouweMeer
Post Prodigy
Post Prodigy

isblank <> blank ?

I created the following table:

 

selectcolumns ( 'table' , "stuff" , 'table'[A] )

I was unable to transform the column [stuff] into numbers, thus I checked the data. I created a custom column with the following boolean:

if ( iserror ( value ( [stuff] ) * 1 ) , 1 , 0 )
It appeared that the field that were not able to transform into a value were blank. Or at least, appeared to be so.

So I modified my original table reference:

selectcolumns ( 'table' , "stuff" , if ( isblank ( 'table'[A] ) , "0" , 'table'[A] ) )

This didn't work... the field were still empty.

So I checked with a new boolean.

if ( [stuff] = blank() , 1 , 0 ). 

All empty lines were returning 1 as if they were blank. If the field is blank, therefor the statement:

if ( isblank ( blank () ) , true , false )

...should return false, but it doesn't. 

 

How comes that if a field is considered to be 'blank' in the [field] : blank() = true, but the statement isblank ( [field] ) returns false? Because I thought the way you can split 0 and blank was by using the isblank statement... but that doesn't work apparently...

5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @DouweMeer .

I'd like to suggest you take a look at below blog from @marcorusso, it mentioned how to use 'blank' value and compare with conditions in dax:

Handling BLANK in DAX 
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft , it looks like it is a linefeed character 0A:

 

When the editor reads a file it collects characters up until a linefeed, replaces the newline with a null (hex 00) and saves the collected characters as a line in your buffer. The point to note is that the linefeed is not saved. It is stripped on a read and added to the end of each line when the file is written.

 

I've reported it as a bug. 

@v-shex-msft 

I do understand the 'blank' values, but I find it weird that in a cell that does not show a value returns me a False result when verified with isblank. 

Assumption: due to not showing a value in my table, the value is not 0, not " " and therefore it is blank. 

This line from your weblink:

IF ( ISBLANK ( BLANK () ), "true", "false" ) = true

In my report it does not return 'true' as suggested by the site, but it returns 'false'. 

 

Statement: Field value is not displayed in the table view, thus suggests to be blank...

Below the boolean expressions with the values returned.

if ( [stuff] == BLANK() , 1 , 0 ) = 0
if ( ISBLANK( [stuff] ) , 1 , 0 ) = 0
if ( [stuff] = BLANK() , 1 , 0 ) = 1
iferror ( if ( value ( [stuff] ) = 0 , 1 , 0 ) , 2 ) = 2
iferror ( if ( value ( trim ( [stuff] ) ) = 0 , 1 , 0 ) , 2 ) = 2
iferror ( if ( [stuff] = " " , 1 , 0 ) , 2 ) = 0
 
Would you be so kind and explain met how the results above do match with the logic mentioned on the webpage of the links you both posted?
ChrisMendoza
Resident Rockstar
Resident Rockstar

@DouweMeer -

Remarks from @ https://dax.guide/blank/

The BLANK value is automatically converted in case it is compared with other values.
The right way to check whether a value is BLANK is by using either the operator == or the ISBLANK function. Do not use the operator “=”.
The operator == is a “strictly equal to” operator that consider BLANK as a different value other than 0 or an empty string.
See related articles for more details.

 

Check out the related articles as well.






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Could it be that the imported "" from Excel (which is [stuff] ) is treated differently than 0 or blank() ?

 

Untitled.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.