Skip to content

Commit 33b9342

Browse files
committed
docs: Fix percent calculations
1 parent 33b1383 commit 33b9342

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ cubes:
284284

285285
- name: completed_percentage
286286
type: number
287-
sql: "({completed_count} / NULLIF({count}, 0)) * 100.0"
287+
sql: "(100.0 * {CUBE.completed_count} / NULLIF({CUBE.count}, 0))"
288288
format: percent
289289
```
290290

docs/pages/product/getting-started/cloud/create-data-model.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ within the `measures` block.
112112
```yaml
113113
- name: completed_percentage
114114
type: number
115-
sql: "({completed_count} / NULLIF({count}, 0)) * 100.0"
115+
sql: "(100.0 * {CUBE.completed_count} / NULLIF({CUBE.count}, 0))"
116116
format: percent
117117
```
118118

@@ -159,7 +159,7 @@ cubes:
159159
160160
- name: completed_percentage
161161
type: number
162-
sql: "({completed_count} / NULLIF({count}, 0)) * 100.0"
162+
sql: "(100.0 * {CUBE.completed_count} / NULLIF({CUBE.count}, 0))"
163163
format: percent
164164
```
165165

docs/pages/product/getting-started/databricks/create-data-model.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ within the `measures` block.
107107
```yaml
108108
- name: completed_percentage
109109
type: number
110-
sql: "({completed_count} / NULLIF({count}, 0)) * 100.0"
110+
sql: "(100.0 * {CUBE.completed_count} / NULLIF({CUBE.count}, 0))"
111111
format: percent
112112
```
113113

@@ -154,7 +154,7 @@ cubes:
154154
155155
- name: completed_percentage
156156
type: number
157-
sql: "({completed_count} / NULLIF({count}, 0)) * 100.0"
157+
sql: "(100.0 * {CUBE.completed_count} / NULLIF({CUBE.count}, 0))"
158158
format: percent
159159
```
160160

0 commit comments

Comments
 (0)