Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago

Related, Relatedtable, Lookupvale

Hello,

 

i got a short question:

i was trying to build up a relationship between 2 sheets. Since it doesn't work automatically i thought about building a relation via lookup() formula or related() or relatedtable(). but afterall i was stucked, since it doesn't make a relation. what must i do...maybe somebody can help me.

 

 

 

 

 

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Relationships are built in the relationship editor. This thing here:

     

     

    Those formulas make use of existing relationships. They don't create them.

     

    ...

     

    Well, lookupvalue actually doesn't require or use relationships. It just looks up columns conditionally based on other columns. In any case, it still doesn't create relationships.

  • v-huizhn-msft's avatar
    v-huizhn-msft
    Microsoft Employee

    Hi Anonymous,

    >> since it doesn't make a relation.

    Could you please share the error message for further analysis?

    In order to create a relationship in a data model in Power BI, at least one side of the relationship must be tied to a column that is unique in the table. Please verify a column in one side is unique. There is no many to many relation in Power BI model.

    In the Power BI data model, you can create relationship by clicking “Manage Relationship” , you will get the following screenshot. Or you can create the relationship in Diagram view as the KHorseman’s posted, you just use the Drag to Zoom control, and select a column and drag to the another column that you want to prefer in another table. More details about creating relationship, please review this article.

     


    If you have any question, please feel free to ask.


    Best Regards,
    Angelia