The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Solved! Go to Solution.
@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
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.
@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
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |