Forum Discussion
Anonymous
3 years agoNot applicable
SUMX Function not working calculating per row
Hi PowerBI Experts. I'm working on a POC project. Sumx Function is not working as expected I might be missing some calculations. Table1: timesheetCC table It contains the actual hours, date, Re...
- 3 years ago
Hi Anonymous ,
When you pick up the MAX at the Actual Cost in the project level you are getting the maximum value for all the lines in that project in this case try to change your measure to:
Actual Cost = SUMX(ADDCOLUMNS('Timesheet CC',"ActualCost",[Actual Hrs])*MAX('Timesheet CC'[Rate])), [ActualCost])Just did this without testing it may need some adjustments.
Anonymous
3 years agoNot applicable
I was not able to make it work but probably I'm just not sure how to adjust it as I'm getting error
but I found another solution here
Solved: Problem with multiplying hours per pay rate - Microsoft Power BI Community
Pay Measure 1 = SUM( 'Hours'[Hours] ) * SUM ( 'PAY RATES'[Hrly Rate] )
Pay Measure 2 =
IF (
HASONEVALUE ( Hours[Employee ID] ),
[Pay Measure 1],
SUMX ( Hours, [Pay Measure 1] )
)- MFelix3 years ago
Super User
Sorry,
Had an additional separator. Try this
Actual Cost = SUMX(ADDCOLUMNS('Timesheet CC',"ActualCost",[Actual Hrs]*MAX('Timesheet CC'[Rate])), [ActualCost])- Anonymous3 years agoNot applicable
I tried it also not working same output as my original one.
Red circle is this formula
Actual Cost CC Test = SUMX(ADDCOLUMNS('Timesheet CC',"ActualCost",[Actual Hrs]*MAX('Timesheet CC'[Rate])), [ActualCost])Appreciate your help thanks!