Microsoft’s Power BI tool has released a new feature (currently in preview) that allows users to modify existing data models directly in the Power BI service. This opens up new possibilities for users to edit relationships, create DAX measures, manage Row-Level Security (RLS), and collaborate with others on the same data model.
Enabling the Feature
To use this new feature, it is automatically enabled for datasets stored in “My Workspace”. For datasets stored in collaborative workspaces, the preview feature must be activated manually. This can be done by selecting “Settings” for the workspace, then “Advanced > Data model settings > Users can edit data models in the Power BI service (preview)”, and finally selecting “Save”.
Accessing the Data Model
Once enabled, the data model for a dataset can be accessed in several ways, including from the workspace content list, datahub content list, dataset details page, and from edit mode for a report connected to the dataset.
Editing the Data Model
Upon opening the data model, users can view all tables, columns, and relationships in their model. Any changes made to the data model are automatically saved. The editing experience offers a multitude of features:
- Create measures: Measures, which are collections of standardized metrics, can be created by selecting the “New measure” button from the ribbon. The measure is then entered into the formula bar, specifying the table and column it applies to.
- Create calculated columns: The “New column” button in the ribbon allows the creation of calculated columns. These are entered into the formula bar, specifying the table to which they apply.
- Create calculated tables: Similar to creating measures and calculated columns, calculated tables can be created by selecting the “New table” button in the ribbon and entering the calculated table into the formula bar.
- Create relationships: Relationships between tables can be created by dragging the column from one table to the column of another table. The properties of the relationship are then configured in the window that appears.
- Set properties: Properties for a given object can be modified using the Properties pane. This includes the ability to set common properties across multiple objects at once by selecting multiple objects while holding down the Ctrl key.
- Define row-level security roles and rules: Security roles can be defined from the ribbon by selecting “Manage roles”, creating a new role, providing a name for the role, selecting the table to apply a row-level security filter to, and using the default editor to define the roles. There is also the option to switch to the DAX editor for defining roles.
- Create layouts: Layouts of the model containing only a subset of the tables can be created, aiding in working with complex datasets. A new layout is created by selecting the “+ button” next to the “All tables” tab, and then dragging a table from the Data pane onto the new layout.
- Create reports: A new report can be created from the data model by selecting the “New report” button in the ribbon. The new report is saved in a chosen workspace, provided the user has write permissions for that workspace.
It’s important to note that all changes made to the data model are automatically saved and are permanent, without an option to undo. Users must have write and build dataset permissions in order to open and edit the corresponding data model in the Power BI service BI service.
Admin Controls and Auditing
Power BI administrators have control over enabling or disabling data model editing in the service for the entire organization or for specific security groups. This setting can be found in the Power BI admin portal.
For auditing purposes, Power BI administrators can track operations related to editing data models in the web from the Microsoft 365 Admin Center. For example, when a user makes a change to an existing model or opens the Open data model experience, these actions are logged and can be audited.
This new feature is a significant enhancement to Power BI’s capabilities, offering a more flexible and collaborative environment for users to work on their data models. However, it’s worth noting that the feature is still in preview as of May 2023, and some aspects may be subject to change or improvement based on user feedback and testing.