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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Joint 3 tables with 2 relationship (second)

Hi all, 

 

I have a situation about joining multiple tables data.

 

1. Each ".Ref No.2" has multiple products,

2. One "Ref No.1", may contain different "Ref No.2", with same products 

 

Is Power BI able to do that?

 

Thanks a lot

 

 

1. Matching indicator

Ref No.1Ref No.2
C0001A0001
C0001A0002
C0002A0003
C0002A0004

 

2. Table small

SKU numberRef No.2Qty
1022-00200-5118-34-10A00011
1022-00200-5118-36-10A00012
1022-00200-5118-36-10A00022
1022-00200-5118-34-10A00033
1022-00200-5118-35-10A00042

 

3. Table big

SKUQtyRef No.1
1022-00200-5118-34-101C0001
1022-00200-5118-36-104C0001
1022-00200-5118-34-104C0002
1022-00200-5118-37-102C0002

 

 

Ideal Result:

Ref No.1Ref No.2SKU numberSmallBig
C0001A00011022-00200-5118-34-1011
C0001A00011022-00200-5118-36-1022
C0001A00021022-00200-5118-36-1022
C0002A00031022-00200-5118-34-1034
C0002A00041022-00200-5118-35-102 
C0002 1022-00200-5118-37-10 2
5 REPLIES 5
az38
Community Champion
Community Champion

Hi @Anonymous 

SKU 1022-00200-5118-36-10 has Qty=4 in the 'Table big' why the row

C0001A00011022-00200-5118-36-1022

has a 2 in BIG column?

do not hesitate to give a kudo to useful posts and mark solutions as solution

LinkedIn


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

hi @az38  because "C0001" contains "A0001" & A0002", each of them has 2 "1022-00200-5118-36-10", so total is 4

Hi  @Anonymous 

 

Sorry It's not clear, in the table Big:

1022-00200-5118-36-10 4 C0001

you said the Qty is 4 coz including the A0001 & A0002, but there no Ref No.2 column in table big, how can it be split into 2 & 2 in the results table? 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
az38
Community Champion
Community Champion

@Anonymous  its clearly unclear. how shoul calculate column Big in output table?

whats difference between Qty in big and small tables? could you show an math formula how do you plan get values in Big nd small columns?

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38 

 

So 1 container can contain multiple invoices, refer to the "indicator table"

However, the SKUs / Quantity in container may different from those in invoices, due to some human error

So I want to use power BI to identify all the errors

 

I asked this question before but I found that I was too simplified the question:

https://community.powerbi.com/t5/Desktop/Joint-3-tables-with-2-relationship/m-p/859328#M412274

 

Thanks!

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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