Skip to content

Commit

Permalink
adding calc group changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kicassidy9 committed Nov 14, 2024
1 parent e3c61c0 commit 3dfed24
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 56 deletions.
48 changes: 23 additions & 25 deletions sml-reference/dimension.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,8 @@ dimensions.
The `relationships` property in a dimension file defines the
relationships to embedded and snowflake dimensions.

:::note
*Note:* The relationships between the model's fact datasets and first
**Note:** The relationships between the model's fact datasets and first
order dimensions (fact relationships) are defined in model files.
:::

## calculation_groups

Expand Down Expand Up @@ -441,9 +439,8 @@ Supported properties:
- `level`: String, required if `row_security` is undefined. The key
level within the dimension to use for the relationship.
- `row_security`: String, required if `level` is undefined. For security
relationships, the [row
security](../../c-creating-and-sharing-cubes/sml-reference/row-security.md)
object that the `from` dataset is linked to.
relationships, the row
security object that the `from` dataset is linked to.

For snowflake relationships (as defined by the `type` property), you
only need to define `level`.
Expand Down Expand Up @@ -494,12 +491,12 @@ For example, if you wanted to use the prefix **Order**, you would set
The name of the calculation group. This must be unique within the
dimension.

## description
## label

- **Type:** string
- **Required:** Y

A description of the calculation group.
The name of the calculation group, as it appears in the BI consumer. This value does not need to be unique.

## calculated_members

Expand All @@ -508,6 +505,13 @@ A description of the calculation group.

Defines the individual calculations in the group.

## description

- **Type:** string
- **Required:** N

A description of the calculation group.

# Calculated Members Properties

## unique_name
Expand All @@ -520,7 +524,7 @@ The name of the calculation. This must be unique within the dimension.
## description

- **Type:** string
- **Required:** Y
- **Required:** N

A description of the calculation.

Expand All @@ -535,7 +539,7 @@ Supported named formats:

`fixed`,`general number`, `none`, `percent`, `scientific`, `standard`

Custom format strings should be in quotes and contain one to four sections, separated by semicolons. For more information on defining custom format strings.
Custom format strings should be in quotes and contain one to four sections, separated by semicolons.

## expression

Expand Down Expand Up @@ -635,10 +639,8 @@ SML supports the following types of secondary attributes:
hierarchical expressions without forcing the user to drill down a
hierarchy.

:::note
*Note:* Secondary attributes cannot be used to create relationships
**Note:** Secondary attributes cannot be used to create relationships
between datasets and dimensions.
:::

## aliases

Expand All @@ -652,7 +654,7 @@ Defines secondary attributes that can be used as aliases for specific hierarchy
- **Type:** array
- **Required:** N

Defines metrics for the level. For more information
Defines metrics for the level.

# Secondary Attributes Properties

Expand Down Expand Up @@ -741,7 +743,7 @@ The column used to sort the attribute's values in result sets. (This only applie
- **Type:** array
- **Required:** N

A list of the calculation types that can be used to create dimensionally modified aggregates for the secondary attribute. Note that when working with a time dimension, you can only define calculation types if the `time_unit` property for the level is set to `day` or longer. For more information on dimensionally modified aggregates
A list of the calculation types that can be used to create dimensionally modified aggregates for the secondary attribute. Note that when working with a time dimension, you can only define calculation types if the `time_unit` property for the level is set to `day` or longer.

## exclude\_from\_dim_agg

Expand Down Expand Up @@ -805,7 +807,7 @@ Supported named formats:

`fixed`,`general number`, `none`, `percent`, `scientific`, `standard`

Custom format strings should be in quotes and contain one to four sections, separated by semicolons. For more information on defining custom format strings.
Custom format strings should be in quotes and contain one to four sections, separated by semicolons.

## dataset

Expand Down Expand Up @@ -917,7 +919,7 @@ Supported named formats:

`fixed`,`general number`, `none`, `percent`, `scientific`, `standard`

Custom format strings should be in quotes and contain one to four sections, separated by semicolons. For more information on defining custom format strings.
Custom format strings should be in quotes and contain one to four sections, separated by semicolons.

## dataset

Expand Down Expand Up @@ -1006,11 +1008,9 @@ Determines how the query engine behaves when all of the following conditions are

Supported values:

> - `error`: Query Engine rejects the query and returns an error message.
> - `empty`: Query Engine displays empty cells in the query results.
> - `repeat`: In the query results, Query Engine repeats the values for
> the secondary metrical attribute at a level of aggregation that
> is determined from the shared dimensions in the query.
- `error`: Query Engine rejects the query and returns an error message.
- `empty`: Query Engine displays empty cells in the query results.
- `repeat`: In the query results, Query Engine repeats the values for the secondary metrical attribute at a level of aggregation that is determined from the shared dimensions in the query.

# Level Attributes Properties

Expand Down Expand Up @@ -1143,10 +1143,8 @@ Defines the column to sort query results on. By default, this is the
`name_column`; however, you can optionally use this property to specify
a different column.

:::note
*Note:* This only applies to MDX queries (queries received through the
**Note:** This only applies to MDX queries (queries received through the
XMLA interface).
:::

## allowed\_calcs\_for_dma

Expand Down
13 changes: 3 additions & 10 deletions sml-reference/metric.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,15 @@ Supported values:
- `stddev_pop`
- `stddev_samp`
- `sum`
- `sum distinct`
- `var_pop`
- `var_samp`

The calculation method you can use depends on the type of metric you're
creating:

- **Semi-additive:** `average`, `sum`, `minimum`, `maximum`
- **Non-additive:** `count distinct`, `percentile`
- **Non-additive:** `count distinct`, `sum distinct`, `percentile`
- **Additive:** All other options

## dataset
Expand Down Expand Up @@ -224,12 +225,6 @@ Using a higher compression score yields more accurate query results but
requires more memory from the engine to process. You may need to run
tests to determine the right level of compression for your needs.

For more information, see [Non-Additive
Metrics](../../c-creating-and-sharing-cubes/creating-cubes/modeling-cube-measures/types-of-cube-measures/non-additive-measures.md).

:::note
*Note:* In Design Center, compression is referred to as **Quality**.
:::

## named_quantiles

Expand Down Expand Up @@ -263,9 +258,7 @@ Supported named formats:
- `standard`

Custom format strings should be in quotes and contain one to four
sections, separated by semicolons. For more information on defining
custom format strings, see [Number Format
Strings](../../c-creating-and-sharing-cubes/creating-cubes/formats-for-data-values/number-format-strings.md).
sections, separated by semicolons.

## unrelated_dimensions_handling

Expand Down
28 changes: 7 additions & 21 deletions sml-reference/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ datasets stored in a connected database. The model is virtual, meaning
the data is not moved or processed up front. Instead, it contains the
logic about how to process and optimize the data at query runtime.

:::note
*Note:* Some properties can appear in both `catalog.yml` and model
**Note:** Some properties can appear in both `catalog.yml` and model
files. Those defined in model files override their counterparts in
`catalog.yml`.
:::

Sample `model` file:

Expand Down Expand Up @@ -316,18 +314,14 @@ need to be unique.
Defines the relationships between the model's fact datasets and first
order dimensions. These are called fact relationships.

:::note
*Note:* These relationships are separate from those defined at the
**Note:** These relationships are separate from those defined at the
dimension level: relationships at the model level involve fact datasets,
while those at the dimension level do not.
:::

:::note
*Note:* Degenerate dimensions have relationships to the fact datasets on
**Note:** Degenerate dimensions have relationships to the fact datasets on
which they are based. However, these dimensions do not need a
`relationships` property as they are created by referencing the fact
dataset columns directly.
:::

If you do not want to add relationships to the model, the value of this
property must be `[]`. For example: `relationships: []`
Expand Down Expand Up @@ -373,9 +367,8 @@ Supported properties:
`unique_name` of the level attribute within the `dimension` to use for
the relationship.
- `row_security`: String, required if `dimension` and `level` are
undefined. For security relationships, the [row
security](../../c-creating-and-sharing-cubes/sml-reference/row-security.md)
object that the `from` dataset is joined to.
undefined. For security relationships, the row
security object that the `from` dataset is joined to.

### role_play

Expand Down Expand Up @@ -413,10 +406,8 @@ Supported properties:
metric/calculation is displayed in BI tools. If your model has a lot
of metrics/calculations, folders are a good way to organize them.

:::note
*Note:* If you do not want to add metrics to the model, the value of
**Note:** If you do not want to add metrics to the model, the value of
this property must be `[]`. For example: `metrics: []`
:::

## description

Expand Down Expand Up @@ -445,20 +436,15 @@ analysts with the entire data model, you can make specific dimensions,
hierarchies, levels, secondary attributes, measures, and calculated
measures invisible to them.

:::note
*Note:* We recommend that you add perspectives *after* a model has
**Note:** We recommend that you add perspectives *after* a model has
been fully tested. Although you can edit a model after adding
perspectives, any changes might require you to update the perspectives
to hide new objects that would otherwise be visible to all users.
:::

The semantic engine imposes no limit on the number of perspectives that
you can add to a model. Perspectives contain no data themselves, but are
simply virtual views of the data.

For more information on perspectives, see [Modeling
Perspectives](../../c-creating-and-sharing-cubes/creating-cubes/modeling-perspectives/index.md).

The `perspectives` property in a model file supports the following
properties.

Expand Down

0 comments on commit 3dfed24

Please sign in to comment.