Kater SQL Functions Calculation context
IGNORE_FILTERS
Removes the query's filters on the dimensions you name, in TOTAL, SHARE_OF_TOTAL or VALUE_FOR.
Family: Calculation context
The grouping does not change.
Syntax
TOTAL(measure, BY(...), IGNORE_FILTERS(dimension, ...))Arguments
| Argument | Description |
|---|---|
dimension | A dimension that the query filters by. Give one or more. |
Returns
Nothing of its own. It changes the filters of the call that holds it.
Usage notes
- The measure’s own definition and the filters of the models it reads still apply.
- The compile refuses a filter that it cannot separate from the dimension, and two changes to the same dimension in one call.
Example
This Sandbox query reads the sample shop’s orders. The table shows the rows that Kater gave.
SELECT orders.region AS "Region", EVAL(orders.sum__quantity) AS "Web and Email Units", MEASURE('all_channel_units', TOTAL(orders.sum__quantity, BY(orders.region), IGNORE_FILTERS(orders.channel))) AS "Units on All Channels"FROM kater_dataset.orders AS ordersWHERE KATER__IS_ONE_OF(orders.channel, 'web', 'email')GROUP BY orders.regionORDER BY 1| Region | Web and Email Units | Units on All Channels |
|---|---|---|
| AMER | 1,041 | 2,179 |
| APAC | 1,076 | 2,097 |
| EMEA | 1,217 | 2,421 |
| LATAM | 1,075 | 2,260 |
| null | 123 | 197 |
The query keeps only web and email orders. Units on All Channels ignores that filter, so it counts every channel in each region.
See also
- Change a measure’s context
- Other functions in Calculation context:
TOTAL,SHARE_OF_TOTAL,VALUE_FOR,CALCULATE_ACROSS,CALCULATE_BY,CALCULATE_PER,RATIO,RUNNING_TOTAL,MOVING_AVERAGE,CUMULATIVE_SHARE,BY,ACROSS