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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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_
Memorable Member
Memorable Member

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.

View solution in original post

1 REPLY 1
Wilson_
Memorable Member
Memorable Member

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.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.