Skip to content

Commit e4c5d3f

Browse files
committed
docs: Explain combining measure and dimension filters
1 parent 056a1d8 commit e4c5d3f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

docs/pages/guides/dbt.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ cubes:
299299
type: count
300300

301301
- name: statuses
302-
sql: "STRING_AGG({status})"
302+
sql: "STRING_AGG({status}, ',')"
303303
type: string
304304

305305
# Model-specific joins

docs/pages/product/apis-integrations/rest-api/query-format.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,11 @@ only one of the following properties:
520520
}
521521
```
522522

523-
> **Note:** You can not put dimensions and measures filters in the same logical
524-
> operator.
523+
**You can not put dimensions and measures filters in the same logical operator.**
524+
When Cube generates a SQL query to the data source, dimension and measure filters
525+
are translated to expressions in `WHERE` and `HAVING` clauses, respectively.
526+
In other words, dimension filters apply to raw (unaggregated) data and measure filters
527+
apply to aggregated data, so it's not possible to express such filters in SQL semantics.
525528

526529
## Time Dimensions Format
527530

0 commit comments

Comments
 (0)