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”
}
}
}