Hi all,
I have a LookML dashboard with a filter for two looks
- dashboard: overview
filters:
- name: time_spec
title: Event Time Range
type: date_filter
default_value: last 7 days
both elements of the dashboard listen to the filter:
listen:
time_spec: view1.modification_date
and
listen:
time_spec: view2.creation_date
now I want to change a certain value in the derived table: sql of view1 based on the values of the filter
view: view1{
derived_table: {
sql:
WITH
days AS (
SELECT *
FROM UNNEST(
GENERATE_DATE_ARRAY (
DATE(TIMESTAMP(DATE_SUB(CURRENT_DATE(), INTERVAL 180 DAY))),
CURRENT_DATE()
)
) as sample_date
),
How do I use a dynamic value instead of the 180? Let’s say the filter is set to last 14 days, then I want the interval clause to be INTERVAL 14 DAY.