Kater SQL Functions Calculate at
KATER__IGNORE_GROUPING_BY
The measure worked out without the grouping and the filters of the fields you name.
Family: Calculate at
Syntax
KATER__IGNORE_GROUPING_BY(measure, field [, ...])Arguments
| Argument | Description |
|---|---|
measure | The measure, bare or as EVAL(measure). |
fields | The fields to take out of the grouping. One or more fields. |
Returns
A number. The field menu writes the @format of the field it reads beside it, or @format number(2) where that field has none and can have decimals.
Usage notes
- Each row gets the value for every value of those fields. So each channel row of a region shows the region’s orders on all channels.
- It compiles to
EVAL(measure, REMOVE(fields)), so the query’s filters on those fields are dropped too. - Its menu name is Across.
- Declare it with
MEASUREand a name of its own, as the field menu does, such asMEASURE('across_channel__count_distinct__order_id', ...).
Example
This Sandbox query reads the sample shop’s orders. The table shows the rows that Kater gave.
SELECT orders.region AS "Region", orders.channel AS "Channel", EVAL(orders.count_distinct__order_id) AS "Orders", MEASURE( 'across_channel__count_distinct__order_id', KATER__IGNORE_GROUPING_BY(orders.count_distinct__order_id, orders.channel) ) AS "Orders on All Channels"FROM kater_dataset.orders AS ordersWHERE KATER__IS_EQUAL_TO(orders.region, 'EMEA')GROUP BY orders.region, orders.channelORDER BY 2| Region | Channel | Orders | Orders on All Channels |
|---|---|---|---|
| EMEA | 202 | 777 | |
| EMEA | paid | 204 | 777 |
| EMEA | store | 186 | 777 |
| EMEA | web | 185 | 777 |
See also
- Calculation context
- Other functions in Calculate at:
KATER__ALWAYS_BY,KATER__CALCULATE_PER