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
Abd_Kh
Regular Visitor

Complicated relationship in tables

Hello everyone, I have some data that contains school list and contractors, each school have 3 contractors (O&M, HVAC and HK) and I have set up the schools location on a map visualization (using latitude and longitude), my question is how to create a relationship between the contractors and the school so that when ever I click on a contract the map will only show the schools which is under that contract.

the school list:

Abd_Kh_1-1715535092649.png

Contract details:

Abd_Kh_0-1715535068174.png

My visualization:

Abd_Kh_2-1715535134872.png

the relationships (I cannot activite the 3 relationship since it is on the same table)

Abd_Kh_4-1715535404193.png

 

 

1 ACCEPTED SOLUTION
Wilson_
Super User
Super User

Hi Abd_Kh,

 

Unpivot your school list table, so that you have a contractor type column as well. For example, school number 100001 would look like:

Wilson__0-1715550536103.png

 

I would also join the two tables together and bring the Value column into the school table as well. That seems to be the only additional piece of information stored separately.


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

 

P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
Wilson_
Super User
Super User

Hi Abd_Kh,

 

Unpivot your school list table, so that you have a contractor type column as well. For example, school number 100001 would look like:

Wilson__0-1715550536103.png

 

I would also join the two tables together and bring the Value column into the school table as well. That seems to be the only additional piece of information stored separately.


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

 

P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.