Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

SUMIF for Power BI - Newbie question



I have two tables with id's that can be linked.


On table 1, I have one unqiue ID per row. On table 2 I have a varying amount of rows per ID:


Table 1 Table 2

 ID        ID Profit/Loss

188       188 £2.56

189       188 £123.54


In table two, each row has a column providing £ value which I need to sum to give a total per ID in table 1. I am trying to use a calculated column in table 1 to do this but can't get a DAX formula to work - bound to me being new to Power BI and DAX formula.


Can anyone provide some help here?

Community Champion
Community Champion



asumming you have a relationship active betwwen both tables


the calculated column in Table 1 will be:



Lima - Peru

Thanks for the help, I'll try that now.


By relationship I take it you mean I have a many to one relationship set up with the many on the table 2 side.



In this scenario, either calculated column or measure can work.




You can understand it like calculated column is resolving the calculation on row level, and the measure will aggregate the data on slicing level. For more details, please see: Calculated Columns and Measures in DAX





The scenario you have described does not warrant a calculated column, you should be using a measure.

       measure_name = sum('table'[column])

given what you have described you should be able to use your value column directly in visuals, if it is a number it is a intrinsic measure which would be displayed with a sigma on the left in the field well


I hope this helps,

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!

Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors