Forum Discussion
Mederic
Post Patron
1 year agoHandling Null Values
Hello, The article in the following link presents 2 methods for handling null values. However, the 2nd method does not seem to give the same result as the 1st method. How can we correct this probl...
- 1 year ago
Operator precedence comes in to play
1000 ?? 0 - 540 ?? 0 is equal to 1000 ?? (0 - 540) ?? 0 which is 1000
lbendlin
Super User
1 year agoFirst off - replacing null values is not necessary in 99% of scenarios. You can work with them just fine in your DAX calculations.
The Coalesce operator needs to have an actual null value to work with. By themselves the "Credit" and "Debit" columns are initially typeless (defaulting to text) and will not show nulls.
Only after you explicitly indicate the column types will you see the nulls
And now you could apply the Coalesce transform (or any of the other transforms)
As stated earlier - most of the time this isn't necessary.