Like what you see? Have a play with our trial version.

Error rendering macro 'rw-search'

null

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The Filters API - this refers to functionality concerned with the filter container object and all of the filters within it (could be one or more filters)
  • The Filters Object API - this refers to functionality concerned with an individual filter


Filters Overview

Filters are used in Yellowfin to restrict the data returned in a report to the exact data that a user is interested in (for example, restricting time periods to just return data for the last quarter, or restricting to a list of countries that a user has responsibility for). You can learn more about filters in general and how to create them in this section.

...

The filter object can be accessed as follows:

For a report:

report.filters


And for a dashboard:

dashboard.filters

This Filters API contains all of the available user prompt filters

...

for a piece of content as well as various methods that allow developers to manipulate the filter. It also can fire a number of events that allows your applications to react to changes within the filters.


How filter values work

A filter will typically relate to a Database column that is to be restricted, such as a specific date field, a dimension field (countries, products) or even a metric (sales, costs, margin). Values are set against a filter and these values are passed through to the Database query in order to restrict the data being returned.

Filter values can have two states - Staged (or normal) and Applied

Applied values are the values that are currently being used by the report or dashboards to filter the query result. Anytime the API uses getAppliedValue it is referring to these values.

A staged filter value is a value that is set in the Filter but not yet applied to the report output. For example in the filter ‘Demographic” when a user selects the value “Adventure” this sets the staged value of that filter to “Adventure”. Anytime the API uses setValue or getValue it is referring to the staged value of the filter. This is not reflected in the report or dashboard until the filters are applied. 

Some filters will also have defaultValues, these are always read only.