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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Vincent_Jaquet
Regular Visitor

sum error when 2 columns of 2 table muliply

Hello,

I try to Multiply 2 Columns of 2 differents table.

one is a Personal reference table  and the other is the hours done by project

I create a relation between the two table with the both column name

 
 
image.pngimage.png
 
 
 
Costs = SUM('DATA'[Hours done]) * SUM('Personel'[Hourly rate])
hours sum are OK
But the sum of the cost are wrong
Thanks for your help
 
image.png
 
 
 

 

1 ACCEPTED SOLUTION

It's ok the summurize must be done on Name and it's ok

 

Thank you very much for your help

 

image.png

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Vincent_Jaquet 

Ideally for mutliplication you should use
Sum(A*B)
When that is not possible use the row context

Costs =
sumx(summarize(Project, project[ID],"_dat",SUM('DATA'[Hours done]) ,"_hrs",SUM('Personel'[Hourly rate])),[_dat]*[_hrs])

 

 if you need more help make me @

Appreciate your Kudos.

Hello,

 

I try your code but I have exactly the same result

My both table are DATA and Personel

 

 

Costs =
SUMX(SUMMARIZE(DATA;DATA[Project];"_dat";sum(DATA[Hours done]);"_hrs";Sum(Personel[Hourly rate]));[_dat]*[_hrs])
 
image.png

It's ok the summurize must be done on Name and it's ok

 

Thank you very much for your help

 

image.png

@Vincent_Jaquet , that is what you could have found best. As I am not aware best of your data model. Kudos !!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.