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
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,17 @@ Cube Cloud supports the following authentication methods for Power BI:

### Connection methods

Power BI provides [three methods][link-powerbi-connection] to connect to data
sources: _live connection_, _DirectQuery_, and _import mode_.
Cube uses Power BI's [_live connection_][link-powerbi-live] mode. You compose
queries using the Power BI UI, and they run against your Cube semantic model in
real time, so you always work with up-to-date data and an up-to-date model.

| | 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> |
<Warning>

__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.
Power BI's other connection methods, [_DirectQuery_][link-powerbi-directquery]
and _import mode_, are not supported. Because writing your own DAX queries
requires _DirectQuery_, custom DAX queries are not supported either.

</Warning>

## Connect to the SQL API

Expand All @@ -82,5 +79,6 @@ than the DAX API. However, this is the only option when using Cube Core.
[ref-kerberos]: /docs/integrations/power-bi/kerberos
[ref-ntlm]: /docs/integrations/power-bi/ntlm
[ref-ntlm-desktop]: /docs/integrations/power-bi/ntlm#power-bi-desktop
[link-powerbi-connection]: https://learn.microsoft.com/en-us/power-bi/connect-data/service-live-connect-dq-datasets
[link-powerbi-live]: https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-about#live-connections
[link-powerbi-directquery]: https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-about
[ref-opdg]: /docs/integrations/power-bi/ntlm#configuration
24 changes: 11 additions & 13 deletions docs-mintlify/docs/integrations/power-bi/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,17 @@ Cube Cloud supports the following authentication methods for Power BI:

### Connection methods

Power BI provides [three methods][link-powerbi-connection] to connect to data
sources: _live connection_, _DirectQuery_, and _import mode_.
Cube uses Power BI's [_live connection_][link-powerbi-live] mode. You compose
queries using the Power BI UI, and they run against your Cube semantic model in
real time, so you always work with up-to-date data and an up-to-date model.

| | 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> |
<Warning>

__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.
Power BI's other connection methods, [_DirectQuery_][link-powerbi-directquery]
and _import mode_, are not supported. Because writing your own DAX queries
requires _DirectQuery_, custom DAX queries are not supported either.

</Warning>

## Connect to the SQL API

Expand All @@ -75,5 +72,6 @@ than the DAX API. However, this is the only option when using Cube Core.
[ref-kerberos]: /docs/integrations/power-bi/kerberos
[ref-ntlm]: /docs/integrations/power-bi/ntlm
[ref-ntlm-desktop]: /docs/integrations/power-bi/ntlm#power-bi-desktop
[link-powerbi-connection]: https://learn.microsoft.com/en-us/power-bi/connect-data/service-live-connect-dq-datasets
[link-powerbi-live]: https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-about#live-connections
[link-powerbi-directquery]: https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-about
[ref-opdg]: /docs/integrations/power-bi/ntlm#configuration
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ and dimensions across views.

Cross-view filtering removes this limitation, letting you build dashboards
that span multiple views and apply filters consistently across visualizations.
It is supported in both [Live connection](#live-connection-mode) and
[DirectQuery](#directquery-mode) modes.

To use cross-view filters such as slicers, you must enable single-perspective mode
in the DAX API. To enable single-perspective mode in the DAX API,
Expand All @@ -29,10 +27,10 @@ enabling this environment variable.

</Warning>

## Live connection mode
## How it works

In Live connection mode, cross-view filters work automatically, provided that
the following two conditions are met:
Cross-view filters work automatically, provided that the following two
conditions are met:

- The column used in the filter must be present in every view that the
cross-filter has to be applied to, and named exactly the same in each view.
Expand All @@ -52,36 +50,6 @@ Likewise, if `orders_view` exposes an `address_country` column pointing to
`country.country`, cross-filtering will not be applied, because the column
names differ between the views.

## DirectQuery mode

In DirectQuery mode, cross-view filters require the same two conditions as in
[Live connection mode](#live-connection-mode): the filter column must be
present in every view with the exact same name, and it must resolve to the
same cube member across those views.

In addition, you must manually configure relationships between tables in Power
BI so that filters propagate across views:

- Open **Model view** in the left sidebar.
- On the right, open the **Data** sidebar, then the **Model** tab.
- Right-click **Relationships** and choose **New relationship**.
- In the **Properties** sidebar, select a table and a column.
- For cardinality, choose **Many to many (\*:\*)**. Ignore the warning.
- Select another table with the same column.
- For cross-filter direction, select **Both**.
- Click **Apply changes**.

Once the relationship is configured correctly, cross-view filters will work in
DirectQuery mode.

The steps above describe configuring a relationship between two tables. When
many views need to be cross-filtered, the best practice is to create a single
view in the Cube data model that includes all the columns from the views that
need to be cross-filtered, and then create relationships between this large
view and each of the other views. This keeps the relationship graph in Power
BI simple and avoids configuring pairwise relationships between every
combination of views.


[ref-dax-api]: /reference/core-data-apis/dax-api
[ref-views]: /docs/data-modeling/views
Expand Down
3 changes: 1 addition & 2 deletions docs-mintlify/reference/core-data-apis/dax-api/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ The DAX API only exposes [views][ref-views], not cubes.
By default, each view is exposed as a separate perspective in Power BI, so
visualizations from different views can't share the same filters. Cross-view
filtering lets you build dashboards that span multiple views and apply filters
consistently across visualizations, in both Live connection and DirectQuery
modes.
consistently across visualizations.

See [Cross-view filtering][ref-cross-view-filter] for details on how to enable
and use it.
Expand Down