Creating buckets of new combined categories for a chart.

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.

d546e108-bd50-4ff8-a10d-33acf206144e.png

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”

    }

  }

}

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