Forum Discussion
elz
10 years agoAdvocate II
Check for null in conditional column
Hi, I am trying to create a conditional column for a date/time field and need to check to see if the field is null. What should I enter in the Value field on the Add Conditional Column dialog bo...
LC_CCS
4 years agoFrequent Visitor
Same question here. The column I am looking at is a Text column. Comparing to null does not work.
I solved this by, in the New Conditional Column dialog editor, putting any value in the string, then editing the M directly in the Formula bar and removing all text between the quotes:
Example: Start with:
= Table.AddColumn(#"Changed Type1", "My New Column", each if [Timecard Pay Code] = "temporary value" then "R" else "OT")
and change to:
= Table.AddColumn(#"Changed Type1", "Time Type", each if [Timecard Pay Code] = "" then "R" else "OT")