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.
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
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/
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |