How to use liquid variables date dimension and forecasting

Hello! I'm using this way to choose data aggregation in my current Looker solution:
 


 

  dimension_group: created {
    type: time
    # hidden: no
    can_filter: no
    timeframes: [date, week, month]
    sql: TIMESTAMP(${TABLE}.atDate);;
  }
  parameter: date_aggregation_parameter {
    hidden: no
    type: unquoted
    label: "Choose data aggregation"
    description: "It is a level of date aggregation, possible values: [Daily, Weekly, Monthly]"

    allowed_value: {
      label: "Daily"
      value: "DAY"
    }
    allowed_value: {
      label: "Weekly"
      value: "ISOWEEK"
    }
    allowed_value: {
      label: "Monthly"
      value: "MONTH"
    }
  }
  dimension: date {
    hidden: no
    # can_filter: no
    type: string
    label_from_parameter: date_aggregation_parameter
    label: "New Date"
    sql:
    {% if date_aggregation_parameter._parameter_value == 'DAY' %}
      ${created_date}
    {% elsif date_aggregation_parameter._parameter_value == 'ISOWEEK' %}
      ${created_week}
    {% elsif date_aggregation_parameter._parameter_value == 'MONTH' %}
      ${created_month}
    {% endif %};;
  }


but unfortunately it doesn't work with data forecasting.
I got this message: Forecasting requires a single date dimension, remove or pivot additional dimensions in your query.

Is there a way not to change date structure and be able to use forecasting at the same time? 

​​​​​​​thanks in advance!

0 4 1,244
4 REPLIES 4
Top Labels in this Space
Top Solution Authors