Does anyone know how to code custom dimension to get "week_end_date" as a new dimension? Versus week_start_date.

Hello Looker community,

I would like to find a way to create a new dimension grouping data for a datatype date to week_end_date versus week_start_team. A specific team I collaborate reports on week_end_date so I would like to utilize that.

I tried following these instructions listed in the looker help center… however it did not work. I kept getting an error when I went to query saying that it did not recognize DATEADD.

https://help.looker.com/hc/en-us/articles/360023906253-Week-Ending-Vs-Week-Beginning#:~:text=Week%20....

Here is how I code the general date/timestamp.

dimension_group: purchase {
    type: time
    timeframes: [
      raw,
      date,
      week,
      month,
      quarter,
      year
    ]
    convert_tz: no
    datatype: date
    sql: ${TABLE}.purchase_date ;;

0 REPLIES 0
Top Labels in this Space
Top Solution Authors