Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
dombarg
Helper II
Helper II

how to create many to many relationship with two duplicated columns in Power Bi Desktop

hello my frinds.

i got a problem in my data model design.

i have two tables in whitch there are two duplicated columns.how can I create a bridge table (if is neccesary) to handle this issues?

thanks.

following pictures are a screenshot of those tables

Table 1 Table 2

 

as u see, city codes and years are those two column i've said.

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Here's an idea.  Using Query Editor, append the City column from both datasets and then remove duplicates.  Save this new one column table as Cities.  Do the same for Years as well.  Then create a relationship.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

Here's an idea.  Using Query Editor, append the City column from both datasets and then remove duplicates.  Save this new one column table as Cities.  Do the same for Years as well.  Then create a relationship.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Community Champion
Community Champion

Well, you could create a new column in each, CityYear that combines those values. Then you would just need a bridge table that has all of the distinct values from those columns.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

thank u.very creative solution.i've used this for other problem.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.