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
gladies123
Helper I
Helper I

Reg:Need a help to avoid many - many Relationships

Hi,

 

I Have table A and Table B While i am trying to connect table A and Table B Many to MAny relationship will be occured. So kindly help me to solve this issue. I have attached the image for ur referenceM-M.PNG

 

 

Thanks,

gladis

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @gladies123 ,

 

What‘s the calculate logic about avg of A, B and C? The average calculated using the data you provided does not match the average displayed in the picture.

Here are the measures I used to avoid relationship.

avg_cost = SUM('Table A'[cost])/SUM('Table A'[count of emp code])

avg_rev = CALCULATE(SUM('Table B'[revenue]),FILTER(ALL('Table B'),'Table B'[pg]=SELECTEDVALUE('Table A'[pg])))/SUM('Table A'[count of emp code])

 1.PNG

 

Best Regards,

Jay

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

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @gladies123 ,

 

What‘s the calculate logic about avg of A, B and C? The average calculated using the data you provided does not match the average displayed in the picture.

Here are the measures I used to avoid relationship.

avg_cost = SUM('Table A'[cost])/SUM('Table A'[count of emp code])

avg_rev = CALCULATE(SUM('Table B'[revenue]),FILTER(ALL('Table B'),'Table B'[pg]=SELECTEDVALUE('Table A'[pg])))/SUM('Table A'[count of emp code])

 1.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@gladies123 , Create a common PG table and join both tables to it

 

distinct(union(all(TableA[PG]), all(TableB[PG)))

 

refer my video for steps https://www.youtube.com/watch?v=Bkf35Roman8

 

refer the concept :https://www.seerinteractive.com/blog/join-many-many-power-bi/

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.