Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |