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
Anonymous
Not applicable

Strange behavior with nested IF when using BLANK

Hi guys, 

 

I'm new to the communtity when it comes to asking questions but I found a bunch of insights here so I hope you can help me with this one 🙂

 

I'm having problems with Power BI behavior when using a nested IF function. You can see how the functions if defined, and trust me that I tried a bunch of different ways to approach the same problem. For some reason it reads the zero values as BLANKs and then the DAX function doesn't get applied the right way. Is this something that's native to DAX, that it doesn't support nested IF's as well as Excel? Based on this logic the "order in full" should return a 1 not a zero. If I use only one IF statement it works fine for all cases except when the "order in full" is BLANK, so I had to use the nested IF.

Wildrosezuzi_0-1650383424170.png

Is this error maybe caused by summarised table? 

 

Thank you guys in advance for your help 🙂

 

2 ACCEPTED SOLUTIONS
johnt75
Super User
Super User

When using the = operator blank does equate to 0. To check for an actual blank value use ISBLANK() instead.

View solution in original post

SpartaBI
Community Champion
Community Champion

you can also use the == operator.
0 = BLANK() is True
0 == BLANK() is False

View solution in original post

4 REPLIES 4
SpartaBI
Community Champion
Community Champion

you can also use the == operator.
0 = BLANK() is True
0 == BLANK() is False

Anonymous
Not applicable

Thank you so much for your help 🙂 I feel stupid, I didn't think of it being so simple 😅

johnt75
Super User
Super User

When using the = operator blank does equate to 0. To check for an actual blank value use ISBLANK() instead.

Anonymous
Not applicable

Awesome, thank you, that did the trick 😄 I love how this community is filled with awesome people willing to help out!

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