Forum Discussion
Add new table to Direct Query semantic model in Fabric
Hi,
I have Direct Query semantic model in a workspace, which is retrieving data from a lakehouse SQL Endpoint:
I have a report in ANOTHER different workspace which retrieves data from the mentioned semantic model (which is in another wokrspace). That is, semantic model and report are in different workspaces:
I don't know how to edit the semantic model. If I open the pbip file from power BI desktop, the connection is a live connection to the semantic model, not Direct Query:
So, if I try to Tranform data, it forces me to convert the model to a new semantic model in direct query (it doesn't change original model, but a new modle pointing to the original model).
How can I edit original semantic model in Fabric and be able to add new columns and tables form Lakehouse as a direct query connection to de semantic model?
Microsoft support team has told me is not possible to achieve this.
If you have a PBIX or PBIP file with your semantic model and report, you can open the File in PBI Desktop and the semantic model mode will be Direct Query. However, if you have a fabric architecture where your semantic models should be in a workspace and reports in another workspace and you manage the integration of the reports with Git (you don't publish the reports, you save changes and pull them into Fabric), the connection to the semantic model which is in Direct Query in Fabric, will be a Live Connection from Desktop, so you can't change the model.
I think is a common use case and it should be resolved. For the moment, the only way I've found to solve this is editing the semantic model from VS Code, but it's very difficult to apply changes by code and not by visual interface.
7 Replies
- lbendlinSuper User
How can I edit original semantic model in FabricDefault Power BI semantic models - Microsoft Fabric | Microsoft Learn
- Default Power BI semantic models can only be edited in the SQL analytics endpoint or warehouse.
- amaaiiaSkilled Sharer
It's not the default semantic model of a lakehouse. Is a new semantic model.
From Power BI Desktop>OneLake Catalog>Lakehouses>[select lakehouse]>Connect to SQL Endpoint>DirectQuery
Then, I saved the pbip file and push it into Git. From Fabric workspace, update Git repository so the pbip file is updated in the workspace (both semantic model and default report are loaded). Then, I deleted the default report attached to the semantic model. Then, open semantic model>new report>[save it in another workspace different from the one where semantic model is].
Ths way, I have DirectQuery semantic model in workspaceA and report in workspaceB. Now, I need to edit semantic model to add new table but I don't know how to do it.
- v-csrikanthCommunity Support
Hi amaaiia
When you open a .pbip file in Power BI Desktop, it establishes a live connection to the existing semantic model stored in the Power BI service. This live connection restricts editing of the underlying data model, such as adding new tables or columns, and only allows creating measures, calculated columns, and visual-level calculations.
- Direct Editing: By editing the semantic model directly in the workspace where it resides, you avoid the limitations of opening a .pbip file that creates a new model.
- Adding Tables: Connecting to the Lakehouse SQL Endpoint in Power BI Desktop allows you to add new tables directly to the existing model.
- Preserving Relationships: This method maintains existing relationships and measures in your semantic model, ensuring that your reports remain functional.
- Testing and Publishing: After making changes, you can thoroughly test the updated model before publishing it back to ensure everything works as expected.
If you follow these steps carefully, you should be able to successfully add new tables without creating a new semantic model.
If the above information helps you, please give us a Kudos and marked the Accept as a solution.
Best Regards,
Community Support Team _ C Srikanth.
- amaaiiaSkilled Sharer
But how do I add tables directly from PBI Desktop? I mean, how do I open the semanttic model from PBI Desktop?
This is mi Git repository semantic_models folder, which is attached to semantic_models workspace:
As you can see, ther's not a PBIP, file. My PBIP file is in reports folder (reports workspace), where .Report directory is, but as I mentioned, if I open this PBIP file, the model is opened with a Live connection.
- lbendlinSuper User
You are mixing concepts. If you want to use only parts of an existing semantic model then change the storage mode to mixed. Then you can choose which tables you want and you can even modify relationships.
However this will not allow you to add tables.
- v-csrikanthCommunity Support
HI amaaiia
It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered?
If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
Looking forward to your reply!
If the above information helps you, please give us a Kudos and marked the Accept as a solution.
Best Regards,
Community Support Team _ C Srikanth. - amaaiiaSkilled Sharer
Microsoft support team has told me is not possible to achieve this.
If you have a PBIX or PBIP file with your semantic model and report, you can open the File in PBI Desktop and the semantic model mode will be Direct Query. However, if you have a fabric architecture where your semantic models should be in a workspace and reports in another workspace and you manage the integration of the reports with Git (you don't publish the reports, you save changes and pull them into Fabric), the connection to the semantic model which is in Direct Query in Fabric, will be a Live Connection from Desktop, so you can't change the model.
I think is a common use case and it should be resolved. For the moment, the only way I've found to solve this is editing the semantic model from VS Code, but it's very difficult to apply changes by code and not by visual interface.