yesno dimension with several conditions

  • 8 October 2021
  • 2 replies

Userlevel 1

Hi folks, I must be extremely dense, but I can’t get this to work and I can’t seem to find an example here that does the same thing.

I’ve tried some case whens, I’ve tried some sql ifs, but no luck.

Could someone please help me convert this custom field into a working dimension I can use to filter with?

if(${question_id} = "text" AND is_null( ${answer_label}), "yes","no")

This topic has been closed for comments

2 replies

Userlevel 3

something like this?

dimension: is_dim_name {
    type: yesno
    sql:  ${question_id} = ‘text’  and ${answer_label} is null ;;


Userlevel 1

You would think so, but even though the answer_label field shows ∅, it doesn’t get filtered out. Almost like Looker doesn’t consider null to be null.