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.
I am trying to relate two tables in power bi that contain geographic information and keep getting a many-to-many relationship. Is there a way to bypass this? The two table samples are included;
State | Region | City | Concerts |
Delaware | Region 2 | Dover | 20 |
New York | Region 1 | Manhattan | 43 |
Texas | Region 4 | Dallas | 68 |
Texas | Region 4 | Houston | 98 |
Table 2
State | Region | City | Protests |
Alaska | Region 5 | Dillingham | 34 |
Alabama | Region 2 | Mobile | 72 |
Illinois | Region 3 | Chicago | 87 |
New York | Region 1 | Bronx | 56 |
Texas | Region 4 | Dallas | 59 |
@Anonymous
Can you share your data or PBIX after removing sensitive information?
That will be useful to help on this further. if not see which are the duplicate keys in both tables and try to work on making them unique as well.
Unfortunately, I can't. I was however able to solve this by creating a bridge table that had just city and state information with no duplicates.
Hello @Anonymous
You can try concating state, region, city in both tables and see if you get a distinct values similar to row count in any one of the table.
That should do the trick. Let me know if this helps!
If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!
Thank you for your response. When I do that, I still get a many-to-many relationship.
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 | |
94 | |
74 | |
71 | |
64 |
User | Count |
---|---|
143 | |
109 | |
103 | |
82 | |
74 |