region = Europe
, or date >= 2024-01-01
).
That allows to create default data filtering, and to adjust business logic based on user intent.
entity.field
) to detect user filters onentity.field
were provided. If not set, the default value is NULL
.entity.filter
to a single value, i.e.
For the user filter entity.field = 'value'
, then would return value
GET_FIELD_SELECTION(entity.field)
and a user filter -
The following examples would all return value
given the filter for it:
entity.field = 'value'
entity.field IN ('value')
entity.field = 'value' AND entity.other_field = 'other_value'
NULL
(or the default value if set):
entity.field || '' = 'value'
entity.field IN ('value', 'other')
entity.field = 'value' OR entity.other_field = 'value'
entity.field >= 'a'
dim_cohort
defining user cohorts, simulate based on cohort choice
dim_grain
selector entity, choose how a metric is calculated at each grain
(See Metrics with different grains).
total_sales_simulated_tax
example above.GET_FIELD_SELECTION
with Domain Source Filters.
For example, add a source filter such as