cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Calculate Sum from another table for matching values

I have 2 tables. One with people and payments. The other with a couple selected names that I want sums for. I need this as a table.

 

table1

name amount

bob 10

joe 5

mike 7

bob 5

mike 2

 

table2

name amount

bob 15

mike 9

 

I think I need something like this:

[table2]amount = calculate( sum( 'table1'[amount]) , 'table1'(name) = 'table2'(name) )

 

I asked a similar question here, but if I calculate it this way, the numbers on my page won't change with the filters I display.

https://community.powerbi.com/t5/Desktop/Need-Table-equivalent-of-SELECT-name-sum-amount-from-Table-...

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Calculate Sum from another table for matching values

Hi bshimamoto, 

You don't need to create sum measure, when add it to table, it will sum automatically

186.PNG

If you want to use another table(table2) in filter, you need to make sure there is a realtionship between two tables, then it will work.

187.PNG

188.PNG

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Re: Calculate Sum from another table for matching values

Bump!

Community Support Team
Community Support Team

Re: Calculate Sum from another table for matching values

Hi bshimamoto, 

You don't need to create sum measure, when add it to table, it will sum automatically

186.PNG

If you want to use another table(table2) in filter, you need to make sure there is a realtionship between two tables, then it will work.

187.PNG

188.PNG

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 291 members 3,224 guests
Please welcome our newest community members: