Forum Discussion

JibinSebastian's avatar
JibinSebastian
Advocate II
6 months ago
Solved

Unable to Create Relationship in Direct Query Tables

 

I created a mirrored SQL database from our on-premises SQL Server. In the mirrored database, I have two tables: Lead and Opportunity.

I built a semantic model using these two tables and connected the semantic model to Power BI. Both tables are configured in DirectQuery mode.

The Lead table contains a column named lead_id(Whole Number), and the Opportunity table contains a column named Oppo_leadid((Whole Number)).

However, when I try to create a relationship between these two columns in the Power BI data model view, Power BI does not allow me to create the relationship.

Could you please help me understand why the relationship cannot be created and how to resolve this issue?

 

 

2 Replies

  • Hi JibinSebastian,

    if I understand you right, your two tables are from the same semantic model and you are connected to that semantic model from your report. In such a case it is not possible to create or modify relationsships between the tables of the same semantic model (see e.g. https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-composite-models)

    What you should try is editing your semantic model and add the relationship there.

     

    Hope that helps.

    • JibinSebastian's avatar
      JibinSebastian
      Advocate II

      I managed to create a shortcut in my bronze lakehouse and fetched to the power bi report now i am able to make relationship. Thank you for your response and time