Forum Discussion

debiagui's avatar
debiagui
Resolver I
2 years ago

Issue with There are ambiguous paths between tables

My model hs the following tables

* Products, were the primary key is ProductId

* Customers,, were the primary key is Id

* Sales, were the primary key is Fecha, ProductId, CustomerId

* SellOut, were the primary key is Fecha, ProductId, CustomerId

* Targets, were the primary key is Fecha, ProductId, CustomerId

* Calendar, were the primary key is Fecha

When I try to add a new relation between Calendar and SellOut fails with this error

 

7 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    debiagui Go ahead and add it as an inactive relationship. Then you can use USERELATIONSHIP in a measure if you need it. That said, I'm not seeing the pathways that it is seeing between the tables given the direction of the relationships.

  • But why it fails? I've a Datamart with the exact same model and works, now in a Lakehouse fails and the data was copied from the Datamart 

    • Greg_Deckler's avatar
      Greg_Deckler
      Community Champion

      debiagui I don't know why as the relationship directions look fine to me. Maybe some bug in Lakehouse and Direct Lake? Wouldn't be surprised honestly.

  • Yes, it's strange. I'll try to simplify the fact tables into a single one by merging Sell-Out and Sales. As you said, this seems like a Lakehouse error.

  • Alexpeles's avatar
    Alexpeles
    Microsoft Employee

    debiagui  there might be a mistake in your model, specifically between Sales and Calendar, I think it should be 1(Calendar) to many(Sales). 

    I had the same issue which you described, and then I double-checked all my relationships, and found out a similar mistake, and it fixed the error for me, maybe it will help you as well.

  • Alexpeles's avatar
    Alexpeles
    Microsoft Employee

    debiagui  there might be a potential mistake in the model, specifically in the relationship between Sales and Calendar table. I think it should be Calendar (1) ---> Sales (many), right now it looks like it's the opposite - Calendar (many) ----> Sales (one). I am right?
    If it's the case, then please try fixing it and see if you still have the same error.