Templating from Filters' values

You can use the currently selected value of Filters in various situations, for example, highlight it in a Narrative or Source to weight your storytelling.

Usage

<%= filters["FILTER_ID"]["columnName"] %>

Tips

When editing a Filter, you can find the filter ID inside the "Information" section.

Date Range Filter's case

Date Range filters are special as when we choose the dataset's column, it's not from where we're fetching data. Also, as a range, it exposes a start and end date. Here's how to use them:

Start

<%= filters["FILTER_ID"]["start"] %>

End

<%= filters["FILTER_ID"]["end"] %>

Hierarchical Filter's case

Hierarchical filters perform automatic rollup based on the hierarchy described in its configuration.

To display the current value displayed, you can use the following syntax:

<%= filters["FILTER_ID"]["__tctc_drill_label__"] %>

To display the current parent, you can use the following syntax:

<%= filters["FILTER_ID"]["__tctc_drill_parent__"] %>

To display the current level, you can use the following syntax:

<%= filters["FILTER_ID"]["__tctc_drill_level__"] %>

Last updated