Forum Discussion

char23's avatar
char23
Helper II
2 years ago

Null dates fields with custom column

How can I deal with null values in a date column in power query. I am basically trying to deal with blank values that show null in power query, but show as blank in the dashboard view. I am trying to write, if [Column1] <> null and [Column2] <> null then "write text" or a statement like if [Column1] = null then "write text", but I keep getting errors. I can't change the null values to a bogus date like (1/1/1900) because it will affect the values I calculate for this column. 

3 Replies

  • definitely avoid using bogus dates. Consider using COALESCE([date],TODAY()) or consider ignoring these values in your measure.  If you provide some more details it will be easier to assist.

    • char23's avatar
      char23
      Helper II

      Hello, thank you for the response. I am trying to write nested if statements in power query for a conditional column. I keep getting the error

       

      "Expression.Error: We cannot convert the value null to type Logical.
      Details:
      Value=
      Type=[Type]"