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
4 changes: 2 additions & 2 deletions content/features/Semantic-Model/semantic-model-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
uid: semantic-model-types
title: Power BI Semantic model Types
author: Morten Lønskov
updated: 2026-10-12
updated: 2026-10-26
applies_to:
products:
- product: Tabular Editor 2
Expand Down Expand Up @@ -59,7 +59,7 @@ Tabular Editor can work with several different model types. Below is an overview

<a name="TE3Prem">3</a> - Tabular Editor 3 features only. Operations performed through the XMLA endpoint requires a Business or Enterprise license. [More information](xref:editions).
<a name="DirectLakeSQLCalculated">4</a> - Direct Lake on SQL only supports calculation groups, what-if parameters and field parameters, which implicitly create calculated tables. General calculated tables are not supported.
<a name="DirectLakeCalcColumn">5</a> - Preview feature. Calculated columns on Direct Lake on OneLake evaluate in the current user's query context rather than being materialized: they respect row-level and object-level security, but cannot be used as relationship keys and do not respond to report filters or slicers. See [Direct Lake Guidance](xref:direct-lake-guidance) for details.
<a name="DirectLakeCalcColumn">5</a> - Preview feature. Calculated columns on Direct Lake on OneLake tables must use the `UserContext` expression context. They're evaluated at query time and aren't materialized, so they can't be used as relationship keys. See [Direct Lake Guidance](xref:direct-lake-guidance#calculated-columns-on-direct-lake-on-onelake) for details.

>[!NOTE]
> The June 2025 release of Power BI Desktop lifted all modeling limitations for third-party tools. Prior to that, various modeling operations were not supported. See [Power BI Desktop Limitations](xref:desktop-limitations).
Expand Down
12 changes: 8 additions & 4 deletions content/features/user-context-calculated-columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
uid: user-context-calculated-columns
title: User-context calculated columns
author: Morten Lønskov
updated: 2026-10-12
updated: 2026-10-26
applies_to:
products:
- product: Tabular Editor 2
Expand All @@ -25,13 +25,17 @@ The calculated column's `ExpressionContext` property sets whether the column is

| Expression Context | Meaning |
|---|---|
| **Standard** | The default. The expression can use only standard functions. The column has one value per row for all users. |
| **User Context** | The expression can call user-context functions. The column is evaluated per user. |
| `Standard` | The default. The expression can use only standard functions. The column has one value per row for all users. |
| `UserContext` | The expression can call user-context functions. The column is evaluated per user. |

Select a calculated column in the @tom-explorer-view and set **Expression Context** under **Options** in the @properties-view.

> [!NOTE]
> `ExpressionContext` requires compatibility level 1705 or higher, and below 1705 calculated columns are always **Standard**.
> `ExpressionContext` requires compatibility level 1705 or higher, and below 1705 calculated columns are always `Standard`.

## Direct Lake on OneLake tables

`UserContext` is the only expression context Power BI supports for calculated columns on Direct Lake on OneLake tables. If a calculated column on a Direct Lake table is set to `Standard` when you save the model to the Power BI service, the save fails with the error "Default expression context cannot be used for calculated columns in Direct Lake tables". Direct Lake on SQL tables don't support calculated columns. For the steps to set the expression context on a Direct Lake model, see [Calculated columns on Direct Lake on OneLake](xref:direct-lake-guidance#calculated-columns-on-direct-lake-on-onelake).

## What a user-context column can't be used for

Expand Down
19 changes: 16 additions & 3 deletions content/tutorials/direct-lake-guidance.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
uid: direct-lake-guidance
title: Direct Lake Guidance
author: Morten Lønskov
updated: 2026-10-12
updated: 2026-10-26
applies_to:
products:
- product: Tabular Editor 2
Expand Down Expand Up @@ -45,16 +45,29 @@ The following table summarizes the storage modes available in Power BI semantic

However, as with Direct Lake on SQL, there are still some [limitations that *do* apply](https://learn.microsoft.com/fabric/fundamentals/direct-lake-overview#considerations-and-limitations). Key limitations include:

- Calculated columns on Direct Lake on OneLake tables are supported in preview, but only in *user context*: the value is evaluated at query time for the current user rather than materialized. This means a Direct Lake calculated column respects row-level and object-level security, but it cannot be used as a relationship key and does not respond to report filters or slicers. Use a measure instead when the result must react to filter context. Direct Lake on SQL still does not support calculated columns at all. See [Develop Direct Lake semantic models](https://learn.microsoft.com/fabric/fundamentals/direct-lake-develop) for details.
- Calculated columns on Direct Lake on OneLake tables are supported in preview, and only with the `UserContext` expression context. Direct Lake on SQL doesn't support calculated columns. See [Calculated columns on Direct Lake on OneLake](#calculated-columns-on-direct-lake-on-onelake).
- Calculated tables cannot reference columns or tables in Direct Lake storage mode. Calculation groups, what-if parameters and field parameters are supported because they create implicit calculated tables that do not reference Direct Lake columns.
- Non-materialized SQL views are not supported as data sources for Direct Lake on OneLake tables. Use materialized views or ensure the source Delta table contains the columns you need.
- Shortcuts in a lakehouse are not supported as data sources during the public preview of Direct Lake on OneLake.

For a full and up-to-date list of limitations, see the [Microsoft documentation on Direct Lake considerations and limitations](https://learn.microsoft.com/fabric/fundamentals/direct-lake-overview#considerations-and-limitations).

### Calculated columns on Direct Lake on OneLake

A calculated column on a Direct Lake on OneLake table must have its `ExpressionContext` property set to `UserContext`. The column is evaluated at query time and isn't materialized, so it can't be used in a relationship. New calculated columns use `Standard` by default. If a calculated column on a Direct Lake table is set to `Standard` when you save the model to the Power BI service, the save fails with the error "Default expression context cannot be used for calculated columns in Direct Lake tables".

The **Expression Context** property appears in the @properties-view only when the model's compatibility level is 1705 or higher. Set it on each calculated column of a Direct Lake on OneLake table:

1. Select the model in the @tom-explorer-view and check **Compatibility Level** under **Database** in the @properties-view. If it's below 1705, upgrade the model as described in @update-compatibility-level.
2. Select the calculated column in the @tom-explorer-view.
3. Under **Options** in the @properties-view, set **Expression Context** to `UserContext`.
4. Save the model.

Calculated columns on Import tables in the same model can use either expression context. For the objects that can't reference a user-context column, see @user-context-calculated-columns. Microsoft lists the supported combinations of storage mode and expression context in [Using calculated columns in Power BI Desktop](https://learn.microsoft.com/power-bi/transform-model/desktop-calculated-columns#materialization-and-performance).

### Composite models

If you need a calculated column that is materialized, usable as a relationship key, or responsive to report filters and slicers, the preview calculated column feature above is not enough. In that case, create a **composite model** by combining Direct Lake tables with Import tables. This is supported with Direct Lake on OneLake, but not with Direct Lake on SQL. In a composite model, you typically keep larger fact tables in Direct Lake mode while using Import mode for smaller dimension tables where you need full calculated columns or custom groupings.
If you need a calculated column that is materialized or usable as a relationship key, create a **composite model** by combining Direct Lake tables with Import tables, and add the calculated column to an Import table. This is supported with Direct Lake on OneLake, but not with Direct Lake on SQL. In a composite model, you typically keep larger fact tables in Direct Lake mode while using Import mode for smaller dimension tables where you need full calculated columns or custom groupings.

Direct Lake on OneLake also supports combining with DirectQuery tables through XMLA-based tools such as Tabular Editor. Import tables can be added through Power BI web modeling, Power BI Desktop (live editing) or through XMLA tools.

Expand Down
Loading