Hi Țîrlea Paul,
Thank you for reaching out to us on Microsoft Q&A forum.
Based on the module's description and your observations, it seems there might be some confusion regarding the example provided in the "Work with Relationships and Cardinality" unit.
A many-to-many relationship is typically used when multiple rows in one table relate to multiple rows in another table. However, if your testing indicates a one-to-many relationship, this could suggest that the scenario was either misinterpreted or not clearly conveyed in the learning module.
To clarify:
- One-to-Many Relationship: If one table has unique values (e.g., Customer ID) and relates to multiple rows in another table (e.g., multiple orders by a customer), this is a one-to-many relationship.
- Many-to-Many Relationship: If neither table has unique values (e.g., multiple customers associated with the same accounts and vice versa), you would need to explicitly define a many-to-many relationship.
In Power BI, many-to-many relationships can be set up by:
- Going to Manage Relationships > New.
- Choosing the columns from the two tables.
- Setting the cardinality to Many-to-Many and enabling bi-directional filtering if required.
Given your results, it might be helpful to recheck the uniqueness of the columns involved or refer to Power BI's guidelines on Many-to-Many Relationships.
If you are still facing any issue, please let us know in the comments and where you are encountering this error along with the screenshot for reference. We are glad to help you.
Please don’t forget to Accept Answer
and Yes
for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.
Thank you.