mirror of https://github.com/buster-so/buster.git
update on multiplier for percents
This commit is contained in:
parent
180a291bc8
commit
29ab620727
|
@ -204,7 +204,7 @@ You can create, update, or modify the following assets, which are automatically
|
||||||
- **Bulk Creation (or Updates)**: You can generate multiple YAML files in a single operation, enabling the rapid creation of dozens of metrics — each with its own data source and chart configuration—to efficiently fulfill complex requests. **You should strongly prefer creating or modifying multiple metrics at once in bulk rather than one by one.**
|
- **Bulk Creation (or Updates)**: You can generate multiple YAML files in a single operation, enabling the rapid creation of dozens of metrics — each with its own data source and chart configuration—to efficiently fulfill complex requests. **You should strongly prefer creating or modifying multiple metrics at once in bulk rather than one by one.**
|
||||||
- **Review and Update**: After creation, metrics can be reviewed and updated individually or in bulk as needed.
|
- **Review and Update**: After creation, metrics can be reviewed and updated individually or in bulk as needed.
|
||||||
- **Use in Dashboards**: Metrics can be saved to dashboards for further use.
|
- **Use in Dashboards**: Metrics can be saved to dashboards for further use.
|
||||||
- **Percentage Formatting**: When defining a metric with a percentage column (style: `percent`) where the SQL returns the value as a decimal (e.g., 0.75), remember to set the `multiplier` in `columnLabelFormats` to 100 to display it correctly as 75%.
|
- **Percentage Formatting**: When defining a metric with a percentage column (style: `percent`) where the SQL returns the value as a decimal (e.g., 0.75), remember to set the `multiplier` in `columnLabelFormats` to 100 to display it correctly as 75%. If the value is already represented as a percentage (e.g., 75), the multiplier should be 1 (or omitted as it defaults to 1).
|
||||||
|
|
||||||
- **Dashboards**: Collections of metrics displaying live data, refreshed on each page load. Dashboards offer a dynamic, real-time view without descriptions or commentary.
|
- **Dashboards**: Collections of metrics displaying live data, refreshed on each page load. Dashboards offer a dynamic, real-time view without descriptions or commentary.
|
||||||
|
|
||||||
|
|
|
@ -301,13 +301,15 @@ definitions:
|
||||||
-
|
-
|
||||||
currency # Note: The "$" sign is automatically prepended.
|
currency # Note: The "$" sign is automatically prepended.
|
||||||
-
|
-
|
||||||
percent # Note: "%" sign is appended. You need to use the multiplier to either multiply or divide the number by 100.
|
percent # Note: "%" sign is appended. For percentage values:
|
||||||
|
# - If the value comes directly from a database column, use multiplier: 1
|
||||||
|
# - If the value is calculated in your SQL query and not already multiplied by 100, use multiplier: 100
|
||||||
- number
|
- number
|
||||||
- date
|
- date
|
||||||
- string
|
- string
|
||||||
multiplier:
|
multiplier:
|
||||||
type: number
|
type: number
|
||||||
description: Value to multiply the number by before display. Default value is 1, so no multiplication is done. However, if the number is a percentage, you should multiply by 100 or divide by 100 based on the context of the query.
|
description: Value to multiply the number by before display. Default value is 1. For percentages, the multiplier depends on how the data is sourced: if the value comes directly from a database column, use multiplier: 1; if the value is calculated in your SQL query and not already multiplied by 100, use multiplier: 100.
|
||||||
displayName:
|
displayName:
|
||||||
type: string
|
type: string
|
||||||
description: Custom display name for the column
|
description: Custom display name for the column
|
||||||
|
|
Loading…
Reference in New Issue