Editar

Compartir a través de


Direct Lake in Power BI Desktop (preview)

Semantic models using Direct Lake mode access OneLake data directly, which requires running the Power BI Analysis Services engine in a workspace with a Fabric capacity. Semantic models using import or DirectQuery mode can have the Power BI Analysis Services engine running locally on your computer by using Power BI Desktop for creating and editing the semantic model. Once published, such models operate using Power BI Analysis Services in the workspace.

To facilitate editing Direct Lake semantic models in Power BI Desktop, you can now perform a live edit of a semantic model in Direct Lake mode, enabling Power BI Desktop to make changes to the model by using the Power BI Analysis Services engine in the Fabric workspace.

Diagram of semantic model edit process with Direct Lake in Power BI Desktop.

Enable preview feature

To live edit a semantic model in Direct Lake mode, you must enable it the preview feature by selecting the following from Power BI Desktop: File > Options and settings > Options > Preview features. Select Live edit of Power BI semantic models in Direct Lake mode, which enables the feature after Power BI Desktop is restarted.

Live edit a semantic model in Direct Lake mode

To perform a live edit of a semantic model in Direct Lake mode, take the following steps.

  1. Open Power BI Desktop and select OneLake data hub:

Screen shot of OneLake data hub banner item in Power BI Desktop.

You can also open the OneLake data hub from a blank report, as shown in the following image:

Screen shot of OneLake data hub ribbon item in Power BI Desktop.

  1. Search for a semantic model in Direct Lake mode, expand the Connect button and select Edit.

Screen shot of searching for a semantic model for Direct Lake mode in Power BI Desktop.

Note

Selecting a semantic model that is not in Direct Lake mode will result in an error.

  1. The selected semantic model opens for editing at which point you are in live edit mode, as demonstrated in the following screenshot.

Screen shot of semantic model opening for editing in Power BI Desktop.

  1. You can edit your semantic model using Power BI Desktop, enabling you to make changes directly to the selected semantic model. Changes include all modeling tasks, such as renaming tables/columns, creating measures, and creating calculation groups. DAX query view is available to run DAX queries to preview data and test measures before saving them to the model.

Screen shot of adding calculation groups and other available tasks in Power BI Desktop.

Note

Notice that the Save option is disabled, because you don’t need to save. Every change you make is immediately applied to the selected semantic model in the workspace.

In the title bar, you can see the workspace and semantic model name with links to open these items in the Fabric portal.

Screen shot of semantic model matching issue.

When you connect and live edit a semantic model. During the preview it's not possible to select an existing report to edit, and the Report view is hidden. You can open an existing report or create a new one by live connecting to this semantic model in another instance of Power BI Desktop or in the workspace. You can write DAX queries in the workspace with DAX query view in the web. And you can visually explore the data with the new explore your data feature in the workspace.

Automatically save your changes

As you make changes to your semantic model, your changes are automatically saved and the Save button is disabled when in Live edit mode. Changes are permanent with no option to undo.

If two or more users are live editing the same semantic model and a conflict occurs, Power BI Desktop alerts one of the users, shown in the following image, and refreshes the model to the latest version. Any changes you were trying to make will need to be performed again after the refresh.

Screen shot of error saving semantic model in Power BI Desktop.

Edit tables

Changes to the tables and columns in the OneLake data source, typically a Lakehouse or Warehouse, like import or DirectQuery data sources, aren't automatically reflected in the semantic model. To update the semantic model with the latest schema, such as getting column changes in existing tables or to add or remove tables, go to Transform data > Data source settings > Edit Tables.

Screen shot of editing tables of a semantic model in Power BI Desktop.

Learn more about Edit tables for Direct Lake semantic models.

Use refresh

Semantic models in Direct Lake mode automatically reflect the latest data changes in the delta tables when Keep your direct Lake data up to date is enabled. When disabled, you can manually refresh your semantic model using Power BI Desktop Refresh button to ensure it targets the latest version of your data. This is also sometimes called reframing.

Export to a Power BI Project

To support professional enterprise development workflows of semantic models in Direct Lake mode, you can export the definition of your semantic model after opening it for editing, which provides a local copy of the semantic model and report metadata that you can use with Fabric deployment mechanisms such as Fabric Git Integration. The Power BI Desktop report view becomes enabled letting you view and edit the local report, publish directly from Power BI Desktop isn't available but you can publish using Git integration. The Save button is also enabled to save the local model metadata and report in the Power BI Project folder.

Navigate to File > Export > Power BI Project and export it as a Power BI Project file (PBIP).

Screen shot of opening a Power BI Project in Power BI Desktop.

By default, the PBIP file is exported to the %USERPROFILE%\Microsoft Fabric\repos\[Workspace Name] folder. However, you can choose a different location during the export process.

Screen shot choosing a different path location for a Power BI Project file.

Selecting Export opens the folder containing the PBIP files of the exported semantic model along with an empty report.

Screen shot of exported folder containing the files of an exported semantic model in Power BI Desktop.

After exporting you should open a new instance of Power BI Desktop and open the exported PBIP file to continue editing with a Power BI Project. When you open the PBIP file, Power BI Desktop prompts you to either create a new semantic model in a Fabric workspace, or select an existing semantic model for remote modeling.

Remote modeling with a Power BI Project

When working on a Power BI Project (PBIP) with a semantic model that can't run on the local Power BI Analysis Services engine, such as Direct Lake mode, Power BI Desktop requires to be connected to a semantic model in a Fabric workspace, a remote semantic model. Like live edit, all changes you make are immediately applied to the semantic model in the workspace. However, unlike live edit, you can save your semantic model and report definitions to local PBIP files that can later be deployed to a Fabric workspace using a deployment mechanism such as Fabric Git Integration.

Diagram of remote semantic model modeling with a Power BI Project in Power BI Desktop.

Note

Semantic models in Direct Lake mode, when exported to a Git repository using Fabric Git Integration, can be edited using Power BI Desktop. To do so, make sure at least one report is connected to the semantic model, then open the report's exported definition.pbir file to edit both the report and the semantic model.

Open your Power BI Project

When opening a Power BI Project (PBIP) that require a remote semantic model, Power BI Desktop prompts you to either create a new semantic model or select an existing semantic model in a Fabric workspace.

Screen shot of setting up the remote model for the Power BI Project.

If you select an existent semantic model and the definition differs, Power BI Desktop warns you before overwriting, as shown in the following image.

Screen shot of semantic model issues in Power BI Desktop.

Note

You can select the same semantic model you exported the PBIP from. However, the best practice when working with a PBIP that requires a remote semantic model is for each developer to work on their own private remote semantic model to avoid conflicts with changes from other developers.

Selecting the title bar displays both the PBIP file location and the remote semantic model living in a Fabric workspace, shown in the following image.

Screen shot of semantic model file location.

A local setting will be saved in the Power BI Project files with the configured semantic model, next time you open the PBIP, you won't see the prompt, and Fabric semantic model will be overwritten with the metadata from the semantic model in the Power BI Project files.

Change remote semantic model

During the preview, if you wish to switch the remote semantic model in the PBIP you must navigate to the \*.SemanticModel\.pbi\localSettings.json file. There, you can either modify the remoteModelingObjectId property to the ID of the semantic model you want to connect to, or remove the property altogether. Upon reopening the PBIP, Power BI Desktop connects to the new semantic model or prompts you to create or select an existing semantic model.

Screen shot of semantic model ID.

Note

The configuration described in this section is intended solely for local development and should not be used for deployment across different environments.

Common uses for Direct Lake in Power BI Desktop

Scenario: I’m getting errors when opening the Direct Lake semantic model for Edit with Power BI Desktop.

Solution: Review all the requirements and permissions. If you met all the requirements, check whether you can edit the semantic modeling using web modeling.

Scenario: I lost the connection to the remote semantic model and can't recover it. Have I lost my changes?

Solution: All your changes are immediately applied to the remote semantic model. You can always close Power BI Desktop and restart the editing session with the semantic model you were working on.

Scenario: I exported to Power BI Project (PBIP). Can I select the same semantic model I was live editing?

Solution: You can, but you should be careful. If each developer is working on their local PBIP and all select the same semantic model as a remote model, they'll overwrite each other's changes. The best practice when working with a PBIP is for each developer to have their own isolated copy of the Direct Lake semantic model.

Scenario: I’m live editing the Direct Lake semantic model and can't create field parameters.

Solution: When live editing a semantic model, Report View isn't available, which is required for the field parameters UI. You can export to a Power BI Project (PBIP) and open it to access Report View and the field parameters UI.

Scenario: I made changes to the semantic model using an external tool, but I don't see those changes reflected in Power BI Desktop.

Solution: Changes made by external tools are applied to the remote semantic model, but these changes will only become visible in Power BI Desktop after either the next modeling change is made within Power BI Desktop, or the semantic model is refreshed.

Requirements and permissions

  • XMLA Endpoint must be enabled on the tenant. Learn more in the XMLA endpoint article.
  • XMLA Endpoint with Read Write access must be enabled at the capacity. Learn more in the tools article.
  • User must have Write permission on the semantic model. Learn more in the permissions article.
  • User must have Viewer permission on the lakehouse. Learn more in the lakehouse article.
  • This feature is unavailable for users with a free license.

Considerations and limitations

Live edit of semantic models in Direct Lake mode in Power BI Desktop is currently in preview. Keep the following in mind:

  • You can't edit default semantic models.
  • You can't transform data using Power Query editor. In the Lakehouse you can use a dataflow to perform Power Query transformations.
  • You can’t have multiple data sources. You can shortcut to or add additional data to Lakehouse or Warehouse data sources to use in the semantic model.
  • You can't publish the Power BI Project (PBIP) from Power BI Desktop. You can use Fabric Deployment mechanisms such as Fabric Git Integration or Fabric Item APIs to publish your local PBIP files to a Fabric workspace.
  • You can't validate RLS roles from Power BI Desktop. You can validate the role in the service.
  • Service-created model diagram layouts aren't displayed in Power BI Desktop, and layouts created in Power BI Desktop aren't persisted in the Power BI service.
  • Signing off during editing could lead to unexpected errors.
  • You can open external tools, but the external tool must manage authentication to the remote semantic model.
  • Changing the data category to barcode won't allow reports linked to the semantic model to be filtered by barcodes.
  • Externally shared semantic models aren't eligible for live edit.

Additionally, please consider the current known issues and limitations of Direct Lake.