How to check for NULL values using Holistics Expression?

How do you check for NULL values in a case statement using Holistics Expression? I am currently doing something like this, which returns 0 (I’m expecting ~200):

count_distinct(
  case(
    when: my_dataset.request_status != null
    , then: my_dataset.user_id
    , else: null
  )
)

I have also tried doing my_dataset.request_status is not null, which throws me this error:

Syntax Error: expected ‘(’, ‘)’, ‘,’, ‘.’, ‘//’, ‘:’, ‘=>’, ‘{’, /[^\S\r\n]/, an operator, newline

I already checked the Holistics Docs but could not find an answer.

Thanks!

I found the answer :sweat_smile: It’s in the docs: Logical Functions | Holistics Docs

not(is(my_dataset.request_status, null))
1 Like