Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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?
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
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:
Proud to be a Super User!
If understand correctly, you need to connect Person table to Main table based on Id? Can you share a screenshot of you data model?
Proud to be a 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:
Or by using the "Manage Relationships" in the Home tab and selecting the "New..." option, like so:
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |