I copied and pasted the code into my LookML from this support page and put in my timestamp field. It does not return the same output in the screenshots. Is this support page out-of-date?
# My original dimension group
dimension_group: created {
hidden: yes
type: time
timeframes: [date,week,month]
sql: ${TABLE}.created_at ;;
}
# My customized timeframes, added under the group "Created"
dimension: date_formatted {
group_label: "Created" label: "Date"
sql: ${created_date} ;;
html: {% verbatim %}{{ rendered_value | date: "%b %d, %y" }};;
}
dimension: week_formatted {
group_label: "Created" label: "Week"
sql: ${created_week} ;;
html: {{ rendered_value | date: "Week %U (%b %d)" }};;
}
dimension: month_formatted {
group_label: "Created" label: "Month"
sql: ${created_month} ;;
html: {{ rendered_value | append: "-01" | date: "%B %Y" }};;
}
Here is my output:
https://cloud.google.com/looker/docs/best-practices/how-to-use-liquid-to-format-dates
In LookML, how I can keep the date sort ordering by render the date as “Mon-Year” i.e.) “Sep-2022”?
they doon’t really explain where this {% verbatim %} tag comes from - have you tried removing it?