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

View all the Fabric Data Days sessions on demand. View schedule

Reply
newpbiuser01
Helper V
Helper V

Lookup and Sum of Values from Another Table

Hello,

 

I'm trying to lookup values from Table 1 - match to similar values in Table 2 and if a match is found, get a sum of the total amount, and if no match found, return a 0 or a blank. Since we have multiple instances of the names in each column, I created a many-many relationship with the Table 1 set to filter Table 2. However, when I try to add the sum of the Amount column to the Table 1, it looks like Table 1 gets filtered too:

 

Table 1:

Name
Andy
Bob
Joe
Mike
Susan

 

Table 2:

NameAmount
Andy10
Andy100
Bob1000
Joe500
Peter10
Peter5
Sally50

 

Expected Result in Table 1:

NameAmount
Andy110
Bob1000
Joe500
Mike0
Susan0

 

However, what I do get for Table 1 is:

NameAmount
Andy110
Bob1000
Joe500

 

newpbiuser01_0-1657829053936.png

 

How do I do the lookup and sum without my primary table getting filtered out? I'd really appreciate any help. 

 

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

Hi, @newpbiuser01 

Many-to-many relationship is not recommended here.

Please modify it as follows.

veasonfmsft_0-1658306757331.png

veasonfmsft_1-1658306800592.png

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @newpbiuser01 

Many-to-many relationship is not recommended here.

Please modify it as follows.

veasonfmsft_0-1658306757331.png

veasonfmsft_1-1658306800592.png

Best Regards,
Community Support Team _ Eason

amitchandak
Super User
Super User

@newpbiuser01 , Make it bi directional and try. Having a many to many it not a good idea

 

Create a common table and try

https://amitchandak.medium.com/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solutio...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors