Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Aerobat
Frequent Visitor

Multiple relations between tables

Maybe an elementary question, but how do I create multiple relations betweens tables?

Example:

Person table has all persons, each person has Id.

Main table has several persons in one row, ex customer, salesagent etc. Each has Id in person table.

How do I create relations?

5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @Aerobat,

The current power bi data model table can create multiple relationships, but it only allows the one major relationship between different table records or they will cause the conflict of records analysis. (normally we will use star schema to build relationships)

Relationships in analysis services tabular models 

Understand star schema and the importance for Power BI - Power BI | Microsoft Docs

In addition, you can also try to do unpivot column on these person fields to convert them to attribute a value.
Then you can simply build relationships on the value field and use the attribute field as filter to control which type of user will be filtered.

Unpivot columns (Power Query) (microsoft.com)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Aerobat
Frequent Visitor

Unfortunately I cannot take screenshot now. It have to wait until monday.

But I have one table with multiple fields referring to one field in "person" table. It is not possible to set up this way.

Generally, when you have a fact table with many id's (person, products, country) you can extract as new dimension tables, containing unique id's and then connect to your main fact table.

You can check this article:

https://radacad.com/creating-a-shared-dimension-in-power-bi-using-power-query-basics-and-foundations...

 

 




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




ALLUREAN
Solution Sage
Solution Sage

If understand correctly, you need to connect Person table to Main table based on Id? Can you share a screenshot of you data model?




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




goncalogeraldes
Super User
Super User

Hello there @Aerobat ! You can create such relationships in the model view in Power BI Desktop by just draging and droping the fields that make the relationship, like so:

goncalogeraldes_0-1642784540856.png

Or by using the "Manage Relationships" in the Home tab and selecting the "New..." option, like so:

goncalogeraldes_1-1642784580346.png

 

PS: this model is based in the NorthWind dataset provided by Microsoft

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

 

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.