Use of parameter with dimension_group (Create dynamic dimension_group in looker)

done
low_priority
lookml
reply

(Prateek Agrawal) #1

I read this article-

This documentation doesn’t tell about Use of parameter with dimension_group. I can create dynamic dimensions but I want to know creation of dynamic dimension_group.

My LookML code for looks like this-

parameter: timelinefilter {
  type: string
  allowed_value: {
    value: "week"
  }
  allowed_value: {
    value: "month"
  }
}
dimension_group: timeline {
    type: time
    timeframes: [
      date,
      week,
      month
    ]
    sql: ${TABLE}.usage_date::date ;;
}

The value of ${TABLE}.usage_date is a timestamp which looks like 2019-02-23T20:00:00Z.

How do I create dynamic dimension_group?


(Izzy) #2

Just making sure— You figured this out, right? Looks like you got it going over here:

Just being sure you’re not still stuck, and linking back to that for anyone who finds this post and is curious about the solution.


(Prateek Agrawal) #3

Yeah, I figured it out, thanks.