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
WayneAtDsn
Regular Visitor

EXACTLY what does BLANK() mean in DAX?

I was surprised to see the following expression in Greg Deckler's "Learn Power BI" book:

 

% Utilization =
   VAR __utilization = DIVIDE([Total Billable Hours], [Total Hours], 0)
RETURN
  __utilization + 0

 

And my question is about the implications of the last line.
Assuming that the VAR expression is returning the same value as BLANK(), then BLANK() is obviously NOT returning a blank character, as adding zero to a character is not meaningful in many computer languages.
But Microsoft DOCs only says that BLANK() returns "a blank", which is clearly not true.
Apparently BLANK() is a kind of pseudo-NULL, but learning that I can add a number to "nothing" was a surprise.
I would appreciate any links or deeper explanations of what's happening above, whether the expression result is equivalent to BLANK() or some other "kind of like NULL" concept.
Thanks in advance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

2 REPLIES 2
WayneAtDsn
Regular Visitor

Thanks for the REPLY.  I didn't find those articles myself during my searching.

It seems a bit odd to me that everybody goes out of their way to remind readers that BLANK is not the same as NULL, as the more obvious connection (to me) was that of a character "blank", similar to the SPACE() function in SQL Server.
This research on data types in Power BI led me on a slightly different tack.  (for some reason) I was expecting Power BI to be more of a superset of data types of it's many potential data sources, but today I learned that the date/time precision is only as good as "old" SQL Server datetime (3 ms) and at one time threw errors and may now truncate datetime2() values, which I have used increasingly in recent years.
Bottom line, very informative.  Thanks again.

amitchandak
Super User
Super User

@WayneAtDsn , refer if the blog from Marcos Russo Can help

https://www.sqlbi.com/articles/how-to-handle-blank-in-dax-measures/

https://www.sqlbi.com/articles/blank-handling-in-dax/

Also, Refer to the explanation at end of the second link

 

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.