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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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