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
dirkkoch
Helper III
Helper III

Lookup max value from two different tables with many to many relationship

Hi, 

 

I am trying to combine data from two different tables with a many to many relationship and get the max value as well as the sum of ID's for a set of distinct values.  A sample with the desired result can be shown in the screenshot below. 

Looking forward to any helpful support!

dirkkoch_0-1642148631052.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@dirkkoch , On of the way is create common tables and join with both of them and avoid many to many

 

example

Numer_id= distinct(union(distinct(Table1[Numer_id]),distinct(Table2[Numer_id])))

 

You create one or more such tables and analyze data with help of those

 

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

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @dirkkoch ,

Has your problem been solved? If not, would you like to attach your pbix file here without sensitive data? It's hard to reproduce the relationship of the two tables.

Best Regards,
Community Support Team _ kalyj

 

 

amitchandak
Super User
Super User

@dirkkoch , On of the way is create common tables and join with both of them and avoid many to many

 

example

Numer_id= distinct(union(distinct(Table1[Numer_id]),distinct(Table2[Numer_id])))

 

You create one or more such tables and analyze data with help of those

 

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

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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.