Skip to content

Commit

Permalink
docs: DAX API for Power BI, Cube Cloud for Excel (#9224)
Browse files Browse the repository at this point in the history
* New structure

* Excel pages

* DAX API / Power BI pages

* Updates
  • Loading branch information
igorlukanin authored Feb 18, 2025
1 parent 84f90c0 commit d2b125e
Show file tree
Hide file tree
Showing 23 changed files with 678 additions and 195 deletions.
13 changes: 12 additions & 1 deletion docs/pages/guides/recipes/auth/sql-api-ldap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ Here's a step-by-step breakdown of the authentication flow:
* Cube verifies the credentials via the Secure LDAP service.
* If credentials are correct, users get access to the dataset.

<InfoBox>

In this recipe, the SQL API is used to connect to [Power BI][ref-powerbi].
Currently, it's recommended to use the [DAX API][ref-dax-api].

</InfoBox>

## Configuration

To verify the credentials, use the
Expand Down Expand Up @@ -177,4 +184,8 @@ module.exports = {
}
};

```
```


[ref-dax-api]: /product/apis-integrations/dax-api
[ref-powerbi]: /product/configuration/visualization-tools/powerbi
55 changes: 28 additions & 27 deletions docs/pages/product/apis-integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,36 @@ With a rich set of APIs, Cube can power and deliver data to all kinds of data
applications.

[Data APIs](#data-apis) are used to run queries against the data model.
Despite using various transports and query formats, all data APIs share common
Despite varying protocols and query formats, all data APIs share common
[querying concepts][ref-queries].

<Diagram src="https://ucarecdn.com/023ca78a-aa96-493a-9799-95955a6d8948/" />
<Diagram src="https://ucarecdn.com/4abc9729-66a3-489f-9d48-0bf27e728c87/" />

Also, there are [management APIs](#management-apis) to control Cube deployments
externally.

<Diagram src="https://ucarecdn.com/8b9c0a27-c9bf-4f32-86b7-223c9fae8cc8/" />
<Diagram src="https://ucarecdn.com/3ff02e30-a010-480d-b6d6-3b927baa0dfe/" />

## Data APIs

A few rules of thumb to help you choose an API:

* When implementing internal or self-serve [business intelligence][cube-issbi] use
case, pick the [SQL API][ref-sql-api] and [Semantic Layer Sync][ref-sls]. The
SQL API allows querying Cube with a Postgres-compatible [dialect of
SQL][ref-sql-syntax], either by writing queries manually or generating them with
BI tools.
* To connect to [Microsoft Power BI][ref-powerbi], use the [DAX API][ref-dax-api].

* To connect to Microsoft Excel, use the [MDX API][ref-mdx-api]. To connect to
Google Sheets, use [Cube Cloud for Sheets][ref-cube-cloud-for-sheets].
* To connect to [Microsoft Excel][ref-excel], use either the [MDX API][ref-mdx-api]
or [Cube Cloud for Excel][ref-cube-cloud-for-excel].

* When implementing [embedded analytics][cube-ea] and [real-time
analytics][cube-rta] use cases, pick [REST API][ref-rest-api] or [GraphQL
API][ref-graphql-api]. Also, the [JavaScript SDK][ref-js-sdk] will simplify
integration with your front-end code. The REST API uses a [JSON-based query
format][ref-json-syntax], and the GraphQL API accepts [GraphQL
queries][ref-graphql-syntax].
* To connect to [Google Sheets][ref-sheets], use [Cube Cloud for Sheets][ref-cube-cloud-for-sheets].

* For AI use cases, consider using the [AI API][ref-ai-api].
* For internal or self-serve [business intelligence][cube-issbi], use
[Semantic Layer Sync][ref-sls] in case it supports your BI tools.
Otherwise, connect via the [SQL API][ref-sql-api] directly.

* For [embedded analytics][cube-ea] and [real-time analytics][cube-rta], use
[REST API][ref-rest-api] or [GraphQL API][ref-graphql-api]. When using the REST API,
the [JavaScript SDK][ref-js-sdk] can simplify integration with your front-end code.

* For AI use cases, use the [AI API][ref-ai-api].

<ReferenceBox>

Expand All @@ -53,21 +52,21 @@ for an unofficial, community-maintained [client library for Python](https://gith
Support for data modeling features differ across APIs, integrations, and [visualization
tools][ref-viz-tools]. Some of the features with partial support are listed below:

| Feature | Supported in | Not supported in |
| Feature | βœ… Supported in | ❌ Not supported in |
| --- | --- | --- |
| [Hierarchies][ref-hierarchies] | βœ… [Tableau][ref-tableau] via [Semantic Layer Sync][ref-sls]<br/>βœ… Cube Cloud for Excel<br/>βœ… [Cube Cloud for Sheets][ref-cube-cloud-for-sheets] | ❌ All other tools |
| [Folders][ref-folders] | βœ… [Tableau][ref-tableau] via [Semantic Layer Sync][ref-sls]<br/>βœ… Cube Cloud for Excel<br/>βœ… [Cube Cloud for Sheets][ref-cube-cloud-for-sheets] | ❌ All other tools |
| [Hierarchies][ref-hierarchies] | [Microsoft Power BI][ref-powerbi] via the [DAX API][ref-dax-api]<br/>[Cube Cloud for Excel][ref-cube-cloud-for-excel]<br/>[Cube Cloud for Sheets][ref-cube-cloud-for-sheets]<br/>[Tableau][ref-tableau] via [Semantic Layer Sync][ref-sls] | All other tools |
| [Folders][ref-folders] | [Microsoft Power BI][ref-powerbi] via the [DAX API][ref-dax-api]<br/>[Cube Cloud for Excel][ref-cube-cloud-for-excel]<br/>[Cube Cloud for Sheets][ref-cube-cloud-for-sheets]<br/>[Tableau][ref-tableau] via [Semantic Layer Sync][ref-sls] | All other tools |

### Authentication methods

Support for authentication methods differ across APIs, integrations, and [visualization
tools][ref-viz-tools]:

| Method | Supported in |
| Method | βœ… Supported in |
| --- | --- |
| [User name and password][ref-auth-user-pass] | βœ… [SQL API][ref-sql-api] and [Semantic Layer Sync][ref-sls]<br/>βœ… [MDX API][ref-mdx-api] |
| [Identity provider][ref-auth-idp] | βœ… Cube Cloud for Excel<br/>βœ… [Cube Cloud for Sheets][ref-cube-cloud-for-sheets] |
| [Access token][ref-auth-tokens] | βœ… [REST API][ref-rest-api]<br/>βœ… [GraphQL API][ref-graphql-api]<br/>βœ… [AI API][ref-ai-api] |
| [User name and password][ref-auth-user-pass] | [DAX API][ref-dax-api]<br/>[MDX API][ref-mdx-api]<br/>[Semantic Layer Sync][ref-sls]<br/>[SQL API][ref-sql-api] |
| [Identity provider][ref-auth-idp] | [Cube Cloud for Excel][ref-cube-cloud-for-excel]<br/>[Cube Cloud for Sheets][ref-cube-cloud-for-sheets] |
| [Access token][ref-auth-tokens] | [REST API][ref-rest-api]<br/>[GraphQL API][ref-graphql-api]<br/>[AI API][ref-ai-api] |

## Management APIs

Expand All @@ -79,6 +78,7 @@ API][ref-orchestration-api].
[cube-ea]: https://cube.dev/use-cases/embedded-analytics
[cube-rta]: https://cube.dev/use-cases/real-time-analytics
[ref-queries]: /product/apis-integrations/queries
[ref-dax-api]: /product/apis-integrations/dax-api
[ref-sql-api]: /product/apis-integrations/sql-api
[ref-rest-api]: /product/apis-integrations/rest-api
[ref-graphql-api]: /product/apis-integrations/graphql-api
Expand All @@ -87,13 +87,14 @@ API][ref-orchestration-api].
[ref-orchestration-api]: /product/apis-integrations/orchestration-api
[ref-sls]: /product/apis-integrations/semantic-layer-sync
[ref-js-sdk]: /product/apis-integrations/javascript-sdk
[ref-sql-syntax]: /product/apis-integrations/sql-api#querying-fundamentals
[ref-json-syntax]: /product/apis-integrations/rest-api/query-format
[ref-graphql-syntax]: /product/apis-integrations/graphql-api#getting-started
[ref-cube-cloud-for-excel]: /product/apis-integrations/microsoft-excel
[ref-cube-cloud-for-sheets]: /product/apis-integrations/google-sheets
[ref-viz-tools]: /product/configuration/visualization-tools
[ref-hierarchies]: /reference/data-model/hierarchies
[ref-folders]: /reference/data-model/view#folders
[ref-powerbi]: /product/configuration/visualization-tools/powerbi
[ref-excel]: /product/configuration/visualization-tools/excel
[ref-sheets]: /product/configuration/visualization-tools/google-sheets
[ref-tableau]: /product/configuration/visualization-tools/tableau
[ref-auth-user-pass]: /product/auth#user-name-and-password
[ref-auth-idp]: /product/auth#identity-provider
Expand Down
6 changes: 4 additions & 2 deletions docs/pages/product/apis-integrations/_meta.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
module.exports = {
"queries": "Queries",
"dax-api": "DAX API",
"mdx-api": "MDX API",
"microsoft-excel": "Cube Cloud for Excel",
"google-sheets": "Cube Cloud for Sheets",
"semantic-layer-sync": "Semantic Layer Sync",
"sql-api": "SQL API",
"rest-api": "REST API",
"graphql-api": "GraphQL API",
"mdx-api": "MDX API",
"google-sheets": "Cube Cloud for Sheets",
"ai-api": "AI API",
"javascript-sdk": "JavaScript SDK",
"orchestration-api": "Orchestration API",
Expand Down
87 changes: 87 additions & 0 deletions docs/pages/product/apis-integrations/dax-api.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# DAX API

The DAX API enables Cube to connect to [Microsoft Power BI][ref-powerbi].
It derives its name from [data analysis expressions][link-dax], a query language
for Power BI and SQL Server Analysis Services.

Unlike the [SQL API][ref-sql-api], it provides a native experience and superior
support for Power BI features.

<SuccessBox>

The DAX API is available in Cube Cloud on [Enterprise and above](https://cube.dev/pricing) product tiers.
It also requires the M [deployment tier](/product/deployment/cloud/pricing#deployment-tiers).

</SuccessBox>

<WarningBox>

The DAX API is currently in preview. Please [contact us](https://cube.dev/contact) to enable it for your account.

</WarningBox>

Read below about the DAX API [configuration](#configuration),
[authentication](#authentication), and [using it](#using-dax-api-with-power-bi) with Power BI.

See the [DAX API reference][ref-ref-dax-api] for the list of supported DAX functions.

<YouTubeVideo
url="https://www.youtube.com/embed/vgrFPOMuJJs"
aspectRatio={8/5}
/>

## Configuration

<WarningBox>

Please contact the customer success team in Cube Cloud so we can guide you
through the configuration.

</WarningBox>

To enable or disable the DAX API on a specific deployment, go to <Btn>Settings</Btn>
in the Cube Cloud sidebar, then <Btn>Configuration</Btn>, and then toggle the
<Btn>Enable DAX API</Btn> option.

## Authentication

The DAX API supports the user name and password authentication method.

## Using DAX API with Power BI

<InfoBox>

The DAX API works only with [views][ref-views], not cubes.

</InfoBox>

{/*
TODO
*/}

### Connection methods

Power BI provides [three methods][link-powerbi-connection] to connect to data
sources: _live connection_, _DirectQuery_, and _import mode_.

| | Live connection | DirectQuery | <nobr>Import mode</nobr> |
| --- | --- | --- | --- |
| Data location | 🟒 Data source | 🟒 Data source | 🟑 Power BI |
| Data freshness | 🟒 Real-time data | 🟒 Real-time data | 🟑 Stale copy |
| Semantic model | <nobr>🟒 Up-to-date model</nobr> | 🟑 Stale copy | 🟑 Stale copy |
| Queries | <nobr>🟒 Composed in UI</nobr><br/><nobr>πŸ”΄ No custom queries</nobr> | <nobr>🟒 Composed in UI</nobr><br/><nobr>🟒 Custom queries</nobr> | <nobr>🟒 Composed in UI</nobr><br/><nobr>🟒 Custom queries</nobr> |

__It's recommended to use a _live connection_ whenever possible.__ Use _DirectQuery_
if you need to write your own DAX queries, but be aware that you must manually
synchronize semantic models as they evolve. _Import mode_ is not recommended, as
it removes the benefits of using a semantic layer.


[ref-powerbi]: /product/configuration/visualization-tools/powerbi
[link-dax]: https://learn.microsoft.com/en-us/dax/
[ref-sql-api]: /product/apis-integrations/sql-api
[ref-ref-dax-api]: /product/apis-integrations/dax-api/reference
[ref-views]: /product/data-modeling/concepts#views
[link-powerbi-connection]: https://learn.microsoft.com/en-us/power-bi/connect-data/service-live-connect-dq-datasets
3 changes: 3 additions & 0 deletions docs/pages/product/apis-integrations/dax-api/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
"reference": "Reference"
}
Loading

0 comments on commit d2b125e

Please sign in to comment.