cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ZaraSeif123 Frequent Visitor
Frequent Visitor

Bridge table

Hi All

I'm new to Power BI and have imported these two tables from salesforce in to my model.

Capture.PNG

'Created by' and 'Sold by' columns contain people names.  I need to make a bridge table here, because the relationship between these tables is many to many.

Couldn't find a way to create the bridge table.

Any help would be appreciated.

 

Thanks

Zara

1 ACCEPTED SOLUTION

Accepted Solutions
cjemmott Regular Visitor
Regular Visitor

Re: Bridge table

There may be a better way to do this, but here is what I did:

 

 

- Duplicate one of your queries (Edit Query -> right click the query from the list on the left and click "duplicate")

- Right click on the column header and select "Remove Other Columns"

- If there are null / missing values, click the small arrow on the right side of the column header and click "Remove Empty"

- Right click on the column header and select "Remove Duplicates"

 

That gives you a unique list to use as the bridge.

 

Then define two relationships, a many to one from 'Created by' to the bridge, and a one to many from the bridge to 'Sold by'.  Make sure both relationships are set to filter in both directions, and you should be good to go!

10 REPLIES 10
cjemmott Regular Visitor
Regular Visitor

Re: Bridge table

There may be a better way to do this, but here is what I did:

 

 

- Duplicate one of your queries (Edit Query -> right click the query from the list on the left and click "duplicate")

- Right click on the column header and select "Remove Other Columns"

- If there are null / missing values, click the small arrow on the right side of the column header and click "Remove Empty"

- Right click on the column header and select "Remove Duplicates"

 

That gives you a unique list to use as the bridge.

 

Then define two relationships, a many to one from 'Created by' to the bridge, and a one to many from the bridge to 'Sold by'.  Make sure both relationships are set to filter in both directions, and you should be good to go!

ZaraSeif123 Frequent Visitor
Frequent Visitor

Re: Bridge table

Hi cjemmott

 

Thanks for your answer, but the rows aren't redundant and I need to keep them, because the count of them is importand for me and I should show the count ot the rows in my matrix.

 

Thanks

Zara

cjemmott Regular Visitor
Regular Visitor

Re: Bridge table

I edited my answer for clarity - let me know if that still isn't what you were looking for.

ZaraSeif123 Frequent Visitor
Frequent Visitor

Re: Bridge table

Hi

 

Yes it helped a lot, but I still can't show all the information I need in one matrix. I already have the correct numbers in two separate matrixes but they should be shown in one.

my model looks like this now:

Capture.PNGCapture2.PNG

I'm trying to merge the two top matrixes into one but the columns aren't showing the way I need it.

 

Thanks

Zara

 

Moderator v-yuezhe-msft
Moderator

Re: Bridge table

@ZaraSeif123 ,

Could you please share me the PBIX file for analysis?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ZaraSeif123 Frequent Visitor
Frequent Visitor

Re: Bridge table

Thanks everybody. The problem is solved.

Blackjack Frequent Visitor
Frequent Visitor

Re: Bridge table

What's the point of only saying the problem is solved without sharing the final solution that solved your issue?
Someone might run into the same problem and won't be able to find the answer here. Just saying.   

ZaraSeif123 Frequent Visitor
Frequent Visitor

Re: Bridge table

Hi

 

I've accepted one of the replies as the solutions.

gil Frequent Visitor
Frequent Visitor

hi

hi

please visited your site

gilsonite

natural asphalt