I am attempting to use Liquid ML to adjust a table i am using for a look depending on the date range a user selects. However, I am getting a “unknown variable datediff” when I try to use date diff. Is there someway I can get around this?
sql_table_name:
{% if DATEDIFF(
IFNULL(
DATE({% date_end anchor_date_range %})
--, current_date)
, DATE(current_timestamp(),cs.timezone))
,
IFNULL(
DATE({% date_start anchor_date_range %})
, DATE('2012-10-01'))
,{% parameter anchor_breakdown_type %}) = 30 %}
looker.aggregated
{% else %}
looker.detailed
{% endif %} ;;