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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
hochgreb
New Member

HELP: Relationship problem (many to many)

Hello Everyone!

I'm finding it very hard to manage a particular relationship and hope you all can help me. 

I want Power BI to calculate the penetration, the quantitty of attachments sold by a company divided by the quantity of machines sold by the same company that those attachments are applicable. The company has a lot of stores and the calculation has to take into consideration posterior filters such as date and store.

Penetration = quantity of attachments sold / quantity of machines sold

 

All the DATA I've got: 

 

1. ATTACHMENTS SALES 

All the invoices with attachments sales with the following columns: 

(Many lines with the same attachment code)ATTACHMENT SALES 2.JPG

 

2. MACHINES SALES 

All the invoices of machine sales 

(Many lines with thew same machine code)MACHINE SALES TABLE.JPG

 

3. APPLICATION TABLE 

Relationship between the attachments and the machines they are applicable. 

(Many lines with the same application code & Many lines with the same machine code)APPLICATION TABLE 2.JPG

 

I've been trying to make the relationships above creating auxiliar tables with the key information but the filter does not work and somehow it shows me the sum of machines sold without takling the application table into consideration. 

 

 

ATTACHMENT SALES TABLE (several lines with the same attachment code - many) > ATTACHMENT KEY TABLE (single line with attachment code - one) > APPLICATION TABLE (several lines with attachment codee - many & several lines with machine code - many) > MACHINE KEY TABLE (single line with machine code - one) > MACHINE SALES TABLE (several lines with the same machine code)

 

 

I appreciate help on this matter. Thank you, 

AH

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @hochgreb

 

This article may help you Many to many relationship.

 

If you still need help, could you share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)

 

Best Regards,

Cherry

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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