Hi,
I have templated filters on derived tables on date. Unfortunately, it looks like I can’t apply a templated filter to a dimension group so I need separate filters for each timeframe. This causes two problems:
- It’s an unnecessary amount of code, but it works. See below.
- I’d like to have default filter values in case people forget to filter on date, which causes a massive query to run on all of our sales history. I could do something like this, but it won’t work because if someone for example filters on report_week instead of report_date, the report_date templated filter will fall back on only pulling yesterday.
and {% if report_date._is_filtered %} {% condition report_date %} rpt_dt {% endcondition %} {% else %} rpt_dt = date_add('day',-1,current_date) {% endif %}
Would it be possible to allow templated filters on a dimension group? Or any other ideas that would work?
Thanks,
Tim
and {% condition report_date %} rpt_dt {% endcondition %}
and {% condition report_time %} rpt_dt {% endcondition %}
and {% condition report_week %} rpt_dt {% endcondition %}
and {% condition report_month %} rpt_dt {% endcondition %}
and {% condition report_month_num %} rpt_dt {% endcondition %}
and {% condition report_month_name%} rpt_dt {% endcondition %}
and {% condition report_quarter %} rpt_dt {% endcondition %}
and {% condition report_quarter_of_year %} rpt_dt {% endcondition %}
and {% condition report_year %} rpt_dt {% endcondition %}
and {% condition report_day_of_week %} rpt_dt {% endcondition %}
and {% condition report_day_of_week_index %} rpt_dt {% endcondition %}
and {% condition report_day_of_month %} rpt_dt {% endcondition %}
and {% condition report_day_of_year %} rpt_dt {% endcondition %}
and {% condition report_fiscal_quarter_of_year %} rpt_dt {% endcondition %}
and {% condition report_fiscal_month_num %} rpt_dt {% endcondition %}