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.
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...
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
@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.
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.
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.
Proud to be a Super User!
Could it be that the imported "" from Excel (which is [stuff] ) is treated differently than 0 or blank() ?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |