Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
How to differentiate between 0 and blank in DAX queries? Whatever query I write, it always considers 0 the same as blank().
My data has blank and 0 as two different values instead of being the same thing.
Solved! Go to Solution.
Try using ISBLANK() instead of comparing to BLANK().
For some reason, those are treated differently. Check out this screenshot:
The two DAX formulas:
BlankCheck = ISBLANK(Numbers[Number]) BlankCheckIf = IF(Numbers[Number] = BLANK(), TRUE(), FALSE())
Here's a good article for some additional information, including truth tables with BLANK() comparisons:
https://www.sqlbi.com/articles/blank-handling-in-dax/
Hey,
using this DAX statement to create a calculated column
Column = IF(ISBLANK('ColumnWithMissingValues'[ColumnWithMissingValues]), "TRUE", "FALSE")
leads to this result
Hopefully this is what you are looking for
Regards
Tom
This is perfect, thank you!
Hey,
using this DAX statement to create a calculated column
Column = IF(ISBLANK('ColumnWithMissingValues'[ColumnWithMissingValues]), "TRUE", "FALSE")
leads to this result
Hopefully this is what you are looking for
Regards
Tom
Try using ISBLANK() instead of comparing to BLANK().
For some reason, those are treated differently. Check out this screenshot:
The two DAX formulas:
BlankCheck = ISBLANK(Numbers[Number]) BlankCheckIf = IF(Numbers[Number] = BLANK(), TRUE(), FALSE())
Here's a good article for some additional information, including truth tables with BLANK() comparisons:
https://www.sqlbi.com/articles/blank-handling-in-dax/
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
80 | |
65 | |
52 | |
49 |
User | Count |
---|---|
211 | |
87 | |
80 | |
69 | |
60 |