Forum Discussion
Regarding there is no defined relationship defined yet message while managing relationship
- 1 year ago
Hi Kiruthiga,
Thank you for reaching out to the Microsoft Fabric Forum Community.Thank you rohit1991 lbendlin, for your helpful insights.
To address the "no defined relationship" issue, creating bridge tables is an effective approach. Since Table1 contains duplicate keys (due to the granularity of Brand, PG, and Segment), it cannot be used directly in a one-to-many relationship with Table2 and Table3, which have unique keys.
While this approach is effective, there are some limitations you should be aware of:
- Adding bridge tables increases the complexity of your data model. You'll need to manage additional relationships, which could become harder to maintain as your model grows.
- The added relationships and more complex DAX queries could lead to slower performance, especially with large datasets.
- If relationships aren't correctly configured, it may lead to issues with filter propagation, causing inaccurate data. Ensure all relationships are set up properly and use DAX functions like USERELATIONSHIP if needed.
- Ensure your bridge tables contain only distinct values. If duplicates are present, it could impact the accuracy of your results.
- Be cautious of introducing many-to-many relationships, as they require careful management and may necessitate advanced DAX for correct behavior.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you
Hi Kiruthiga,
The “no defined relationship defined yet” message is almost always because Power BI needs the “one” side of a one-to-many relationship (in your case, Table2 and Table3) to have unique keys. Since Table1 has duplicates in Key1/Key2, you can’t link directly—Power BI will stop you.
Here’s what usually works best in this scenario:
-
Create a bridge table with all unique Key1 and Key2 combinations. You can easily do this in Power Query: Select just the Key1 and Key2 columns from Table1. Remove duplicates. Name it “BridgeTable”.
-
Set up relationships so BridgeTable connects to Table1 (many-to-one) and to Table2/Table3 (one-to-one or many-to-one, depending on their data). The BridgeTable should act as your slicer/filter in visuals.
-
Build your report visuals and filters using the BridgeTable. This way, everything filters and aggregates properly, and you avoid the “no defined relationship” issue.
Why use a bridge table? It keeps your data model clean, allows for proper relationships, and gives you more control if you add more tables in the future. It’s the standard approach in Power BI for handling these cases. Avoid using many-to-many relationships unless you’re absolutely sure you need them , they can create unexpected results.
- Kiruthiga1 year ago
Helper I
Thank you Rohit! I am planning to create a brdige table between Table1 and Table2. This table will have only distinct keys then a connection from bridgetable to table1(one to many) and bridgetable to table2(one to one) is the idea? (likewise another bridge from table1 to table3)
If I do that since my filters are in table1 , will still that works?
appreciate your thoughts!
Best,
Kiruthiga
- v-saisrao-msft1 year ago
Community Support
Hi Kiruthiga,
Thank you for reaching out to the Microsoft Fabric Forum Community.Thank you rohit1991 lbendlin, for your helpful insights.
To address the "no defined relationship" issue, creating bridge tables is an effective approach. Since Table1 contains duplicate keys (due to the granularity of Brand, PG, and Segment), it cannot be used directly in a one-to-many relationship with Table2 and Table3, which have unique keys.
While this approach is effective, there are some limitations you should be aware of:
- Adding bridge tables increases the complexity of your data model. You'll need to manage additional relationships, which could become harder to maintain as your model grows.
- The added relationships and more complex DAX queries could lead to slower performance, especially with large datasets.
- If relationships aren't correctly configured, it may lead to issues with filter propagation, causing inaccurate data. Ensure all relationships are set up properly and use DAX functions like USERELATIONSHIP if needed.
- Ensure your bridge tables contain only distinct values. If duplicates are present, it could impact the accuracy of your results.
- Be cautious of introducing many-to-many relationships, as they require careful management and may necessitate advanced DAX for correct behavior.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you
- v-saisrao-msft1 year ago
Community Support
Hi Kiruthiga,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you. - v-saisrao-msft1 year ago
Community Support
Hi Kiruthiga,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.