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
Cynwaa
Frequent Visitor

ISBLANK() and IF(...=BLANK()) return different results

Hi Power BI Community, I ran into a strange mistake here:

 

I accidentally discoved that when I use

IF([Column]=BLANK(), "TRUE", "FALSE")

the returned value is different from

ISBLANK([Column])

 

Dose anyone have any idea why would it be the case? 

 

Codes:

lOOKUPVALUE = LOOKUPVALUE(Consolidated[VALUE],Consolidated[KEY],'Results'[KEY])
IF blank = IF(LOOKUPVALUE(Consolidated[VALUE],Consolidated[KEY],'Results'[KEY])=BLANK(),"TRUE","FALSE")
ISBLANK = ISBLANK(LOOKUPVALUE(Consolidated[VALUE],Consolidated[KEY],'Results'[KEY]))

 

Untitled picture.png

 

1 ACCEPTED SOLUTION

@Cynwaa ,

 

No, IF() function works well, because "0 = BLANK()" will always return bool value "TRUE".

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-yuta-msft
Community Support
Community Support

@Cynwaa ,

 

Could you share the sample data of report table?

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yuta-msft , thanks for your reply! 

 

below are links for the sample data. 

 

Power BI file: https://www.dropbox.com/s/uj9my9xiewiswdh/Test.pbix?dl=0

Source data in excel: https://www.dropbox.com/s/hgm837seq3ll7wo/Test.xlsx?dl=0

@Cynwaa ,

 

Sorry for late, there's some difference between these two functions, if you change one "0" to "NULL" or nothing, ISBLANK() can work. But if the value is "0", ISBLANK will recognize it as a number "0".

Capture.PNG  

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yuta-msft thanks a lot for your reply. 

 

I think the ISBLANK() function is always working alright, but my question is rather: why doesn' t the IF function work?

IF([Column]=BLANK(), "TRUE", "FALSE")

@Cynwaa ,

 

No, IF() function works well, because "0 = BLANK()" will always return bool value "TRUE".

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ah ok ... thanks a lot for this answer, I think that's the problem.

 

But why 0=BLANK() is true? That is not so intuitively understandable.. 

Hey @Cynwaa , here is the explanation

 

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.

Top Solution Authors