Search multiple substrings from multiple columns..

Hi, 

I have two columns in my source data, one a measure and one dimension. I've written below a code to find multiple subtrings from 2 columns, and also label them. But, I get different errors when I'm using different keywords like IN, LIKE, CONTAINS etc..the below code gives me the error : SELECT list expression references col3 which is neither grouped nor aggregated 

measure: col1 {
type: string
sql: if(${col2}>=0, " string1", "string2") ;;
}

dimension: col3 {
type: string
sql: ${TABLE}.col3;;
}


measure: col4 {
type: string
case: {

when: {
sql: ${col1} = 'string1' AND ${col2} IN ('sub-string1' , 'sub-string2' , 'sub-string3' , 'sub-string4' , 'sub-string5');;
label: "string 3"
}
else: "unknown"
}}

Thank you..

 

 

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