You can use “Null” without the quotes, or you could use the ISBLANK DAX function to fix it.
In this case, you should note the following:
- When the source is a CSV file and the field is empty, the query will show it as “empty string”. So the value “” is true and the preview will appear as blank.
- When the source is other (XLS, XLSX, ACCDB, etc) and the field is empty, the query will show it as “null value”, and the value “” is false. The preview will appear as null.
As an alternative you could complete this logic as a calculated column, which in my view would likely be a bit easier.
Personally I rarely use the custom column feature in the query editor because a can usually get what I need done an easier way using another option in Power BI