SQL Error: Unrecognised keyword CONTAINS/MATCHES_FILTER/LIKE

Hi there,

I need some help with case statement syntax. Here, in the below statement ‘category’ is a measure and ‘description’ is a dimension which has some text. I am trying to create a new measure which assigns labels based on data from category and descriptions fields. I tried using CONTAINS, LIKE, matches_filter keywords, but I am getting errors like keyword is unrecorgnised. Please help a solution to this problem.. Thank you!!

Measure: labels{

Type: string

Case:{

when:{

        sql: ${category} = "category1" and ${description}=("sub_string1"," sub_string 2");;

        label: "label 1"

      }

when:{

        sql: ${type} = "Type1" and ${description}=("sub_string3"," sub_string 4");;

        label: "label 2"

      }

Else: “unknown label”

}

 

0 0 123
0 REPLIES 0
Top Labels in this Space
Top Solution Authors