Hello,
I am hoping someone can help me with this. I am not sure if this can be done in a table calculation or creating a new variable. I had originally tried to do this in LookML. And it did not work.
I would like to group together some retail stores, for exampleโฆ
I would like to categorize or group JC Penny, Johns shoe shop, Target and Costco as โChannel_Bucket.โ
I had originally tried to do this in lookML using the case when function but it did not work for me unless I did it wrong.
For example,
dimension: channel_bucket {
case: {
when: {
sql: ${TABLE}.channel = JC Penny, Johns shoe shop, Target, Costco ;;
label: โRetail Otherโ
}
when: {
sql: ${TABLE}.channel = Zappos, Backcountry ;;
label: โOnlineโ
}
when: {
sql: ${TABLE}.channel = Soles, Dillards ;;
label: โDTโ
}
when: {
sql: ${TABLE}.channel = Walmart ;;
label: โWalmartโ
}
when: {
sql: ${TABLE}.channel = Amazon;;
label: โAmazonโ
}
}
}