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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Jeff2Jets
Helper II
Helper II

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.