Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions docs/pages/product/apis-integrations/mdx-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,29 @@ directly to the upstream data source.
- If some queries still go to the upstream data source, it should respond with a
subsecond latency. Consider tuning the concurrency and quotas to achieve that.

### Date hierarchies

By default, the MDX API creates additional hierarchies for all [time dimensions][ref-time-dimensions] and organizing them in a separate folder called "Calendar" for each dimension.
This creates a Calendar hierarchy structure containing `Year`, `Quarter`, `Month`, `Week`, and `Day` levels, as well as Calendar Quarter of Year and Calendar Year hierarchies.

```
- Dimension Calendar:
- Year
- Quarter
- Month
- Week
- Day
- Dimension Calendar Quarter of Year:
- Quarter
- Dimension Calendar Year
- Year
```

These hierarchies are particularly useful in Excel because they allow you to filter your data without needing to drill down or expand all levels.
Additionally, you can combine Calendar Year or Calendar Quarter of Year as filters while placing other dimensions on the axis.

You can set the `CUBE_MDX_CREATE_DATE_HIERARCHIES` environment variable to `false` to disable this behavior.

### Measure format

The MDX API respects the [`format` parameter][ref-measure-format] of measures so that the
Expand Down Expand Up @@ -94,7 +117,7 @@ views:

For historical reasons, the syntax shown above differ from how
[hierarchies][ref-hierarchies] are supposed to be defined in the data model.
This is going to be harmonized in the future.
This is going to be harmonized in the future.

</InfoBox>

Expand Down Expand Up @@ -185,7 +208,7 @@ views:

For historical reasons, the syntax shown above differ from how
[folders][ref-folders] are supposed to be defined in the data model.
This is going to be harmonized in the future.
This is going to be harmonized in the future.

</InfoBox>

Expand All @@ -203,4 +226,4 @@ Authentication and authorization work the same as for the [SQL API](/product/api
[ref-deployment]: /product/deployment/cloud/deployments
[ref-pre-aggregations]: /product/caching/using-pre-aggregations
[ref-rollup-only-mode]: /product/caching/using-pre-aggregations#rollup-only-mode
[ref-measure-format]: /product/data-modeling/reference/measures#format
[ref-measure-format]: /product/data-modeling/reference/measures#format
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ If `true`, the DAX API will expose time dimensions as calendar hierarchies.

## `CUBE_XMLA_LANGUAGE`

This variable is used to [configure the locale][ref-mdx-api-locale] for the [MDX API][ref-mdx-api].
This variable is used to [configure the locale][ref-mdx-api-locale] for the [MDX API][ref-mdx-api].

| Possible Values | Default in Development | Default in Production |
| --------------- | ---------------------- | --------------------- |
Expand All @@ -1325,6 +1325,14 @@ CUBE_XMLA_LANGUAGE=nl-NL

[link-lcid]: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f

## `CUBE_MDX_CREATE_DATE_HIERARCHIES`

If `true`, the [MDX API][ref-mdx-api] will automatically create additional hierarchies for all [time dimensions][ref-time-dimensions] and organize them in a separate "Calendar" folder for each dimension.

| Possible Values | Default in Development | Default in Production |
| --------------- | ---------------------- | --------------------- |
| `true`, `false` | `true` | `true` |

## `CUBEJS_NESTED_FOLDERS_DELIMITER`

Specifies the delimiter used to flatten the names of nested [folder][ref-folders] in
Expand Down Expand Up @@ -1830,4 +1838,5 @@ The port for a Cube deployment to listen to API connections on.
[ref-context-to-app-id]: /product/configuration/reference/config#context_to_app_id
[ref-environments]: /product/workspace/environments
[ref-mdx-api]: /product/apis-integrations/mdx-api
[ref-mdx-api-locale]: /product/apis-integrations/mdx-api#measure-format
[ref-mdx-api-locale]: /product/apis-integrations/mdx-api#measure-format
[ref-time-dimensions]: /product/data-modeling/reference/dimensions#time