Forum Discussion

marius1106's avatar
marius1106
Icon for Helper II rankHelper II
1 year ago
Solved

Semantic model modification destroys whole data model

Dear Microsoft,   While building reports, I noticed some strange errors: When I click on edit tables in my semantic model to reload some tables the Report isn't working anymore. I looked at the sem...
  • v-dineshya's avatar
    1 year ago

    Hi marius1106 ,

    Thank you for reaching out to the Microsoft Community Forum.

     

    Root Cause Analysis:

    1.Relationships Disappear or Break After Table Refresh: When you reload or modify tables, Power BI or Fabric often recreates the table structure behind the scenes. Even though the table name stays the same, the underlying metadata identity changes, which invalidates relationships that were previously set up. This is especially common if you're using semantic models directly tied to Lakehouse or Warehouse without schema constraints.

    2.No Primary/Foreign Keys in the Warehouse: Yes, this contributes to the problem. Without primary keys and foreign keys, the semantic model engine cannot automatically infer or re-bind relationships after a table reload. Even though you can define relationships manually, they're more fragile when the engine lacks schema guidance.

    3.Warehouse vs Lakehouse: Whether you're using a Warehouse or Lakehouse isn’t the main problem. The issue is rooted in semantic model behavior and the absence of enforced keys—which affects both Warehouse and Lakehouse equally.

    Please follow below steps:

    1.Define Primary and Foreign Keys in Your Data Warehouse: This gives the semantic model engine metadata to work with, allowing it to preserve or recreate relationships reliably after table reloads. Most SQL-based engines (like Fabric Warehouse) allow you to define PRIMARY KEY and FOREIGN KEY constraints—even if not enforced physically.

    2.Avoid Frequent Manual Reloads Unless Necessary: If possible, avoid clicking “Edit tables” frequently unless you’re adding or removing columns. Try to plan schema changes in bulk and re-establish relationships once.

    3.Use Tabular Editor (if supported): You can export your entire semantic model with relationships using Tabular Editor. If relationships get broken after a change, you can re-apply your previously saved model and rebind the structure.

    4.Document and Automate Model Setup: If you're working with 100+ tables, consider scripting your model creation using TOM (Tabular Object Model) or Power BI REST APIs. This makes it easier to re-create or repair models when they break.

    5.Raise with Microsoft: You're not the only one facing this issue. Microsoft is aware of it in Fabric and Power BI in certain versions. Consider opening a support ticket and referencing other community threads—there’s a chance your case could push for better schema stability features.

     

    If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

    Thank you