Skip to Main Content
Preset Feature Feedback
Status Needs review
Categories New feature
Created by Vítor Ávila
Created on Jun 26, 2023

Support {{from_dttm}} and {{to_dttm}} Jinja macros in the Chart Builder

What is the problem or goal the end user is trying to solve or accomplish?

It's possible to use {{from_dttm}} and {{to_dttm}} in the Chart Builder/Dataset query to retrieve temporal filters applied to dashboards. However, this doesn't work anymore to retrieve temporal filters applied in the chart level. It used to work before the GENERIC_CHART_AXES enablement, since we would have only a single temporal filter in the chart. Now, it's possible to have multiple temporal filters, however the Jinja macros don't retrieve the values.

How are they solving it currently?

Not possible to solve.

What is the recommended solution by the Customer?

Implement support for these macros to retrieve temporal filters applied in the chart level. Suggested behavior:

  • If there's only one temporal filter applied, the macro should retrieve its value

  • If there are multiple temporal filters applied:

    • In case the Axis column is temporal, it should be this one.

    • If not, it could be the first one added in the filters section.

    • Alternatively, users could specify the column in the macro (like {{from_dttm($column_name)}}).

  • Attach files
  • +3