I’m currently using a derived table with templated filter, which has a default setting of limit to past 3 months via always_filter. It works nicely, though quite slow due to all the grouping involved in the derived table. What I’m trying to do is to create a persistent derived table so that everything is pre-grouped. Then I will just apply the filter after the PDT has been built.
Problem is, if I remove the following filter entry used by the templated filter (see 1st entry below) in the view definition I get a “always_filter: unknown filter field ‘view_name.filter_date’” message, even if I have a dimension field called filter_date (see 2nd entry). If I keep the filter entry, there’s no error but it ignores that filter (I guess the filter entry in the view is only used by templated_filters).
Am I doing something wrong or am I hitting a bug? Below shows the relevant lookml. Thanks.
On the view:
- filter: filter_date
label: 'Date or Date Range'
type: date
convert_tz: false
- dimension: filter_date
type: time
timeframes: [date, week, month, year]
sql: ${TABLE}.filter_date
convert_tz: false
On the model:
- explore: view_name
always_filter:
filter_date: 3 months ago