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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Jeff2Jets
Helper III
Helper III

How to total values in one table from another

I have two tables. One is named 'Mailbox' and the other is named 'Folder'. They both have a column named 'Name' and there is a one to many relationship between 'Mailbox' to 'Folder' using the 'Name' column. There are multiple rows in the 'Folder' table for the same value in the 'Name' column and each row in the 'Folder' table has a numeric column named 'Messages', which contains the # of messages for each folder. I would to create a column within the 'Mailbox' table that represents the sum of all rows in the 'Folder' table for the 'Messages' column.

Here is an example rows in the 'Folder' table:

Name            Folder        Messages

John Smith    \Drafts                 10

John Smith    \Inbox                  20

John Smith    \Sent Items          30

 

In the 'Mailbox' table, I want to create a column named 'Messages' that has a value of 60 (10 + 20 + 30).

Thank you!

1 ACCEPTED SOLUTION
Dangar332
Super User
Super User

hi, @Jeff2Jets 

try below

column =
   CALCULATE(SUM('folder'[messages]))

View solution in original post

2 REPLIES 2
Dangar332
Super User
Super User

hi, @Jeff2Jets 

try below

column =
   CALCULATE(SUM('folder'[messages]))

Thanks for the help!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.