cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
michaelkwb Occasional Visitor
Occasional Visitor

2 fields requiring reference from the same field

hi,

 

I have 2 fields, POL (port of loading) and POD(pod of discharge). These are 5 letter codes that shows both country and city. I also have a master list of all portcodes with seperate columns for country and city.

 

I initially created a relationship between both sheets selecting POD and the portcode in the master list. When I select country in the charts, it shows the POD countries. This was what I wanted.

 

however, when I decided to include POL into my visualisations and wanted to show the countries of the POL, it was unable to link the POL countries when I select country from the master list in the visualisation. It still shows the POD countries.

 

Can someone advise on the steps I will need to take?

1 ACCEPTED SOLUTION

Accepted Solutions
SteveCampbell Established Member
Established Member

Re: 2 fields requiring reference from the same field

A coiuple of ways, you could have multiple relationships and write DAX with USERELATIONSHIP. But this is quite complicated.

 

For the descriptopn, it sounds like you could create a star schema with three dimensions:

Country/City,

Product (with a unique product id to link to pod and pol)

 

Then two fact tables, with

POD 

POL

 

Check out the documentation:

https://docs.microsoft.com/en-us/power-bi/guidance/star-schema

 

 

 

Love hearing about Power BI tips, jobs and news?
I love to share about these - connect with me!

Stay up to date on  linkedin-logo.png
Read my blogs on  powerbi.tips_.png

Remember to spread knowledge in the community when you can! tu.png

View solution in original post

1 REPLY 1
SteveCampbell Established Member
Established Member

Re: 2 fields requiring reference from the same field

A coiuple of ways, you could have multiple relationships and write DAX with USERELATIONSHIP. But this is quite complicated.

 

For the descriptopn, it sounds like you could create a star schema with three dimensions:

Country/City,

Product (with a unique product id to link to pod and pol)

 

Then two fact tables, with

POD 

POL

 

Check out the documentation:

https://docs.microsoft.com/en-us/power-bi/guidance/star-schema

 

 

 

Love hearing about Power BI tips, jobs and news?
I love to share about these - connect with me!

Stay up to date on  linkedin-logo.png
Read my blogs on  powerbi.tips_.png

Remember to spread knowledge in the community when you can! tu.png

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 170 members 1,873 guests
Please welcome our newest community members: