Forum Discussion
Anonymous
2 years agoNot applicable
Calculate average with reference to another table - matrix
I'm struggling with the below case. I have created a measure which calculates total number of hours per certain activities: SUM_Activities12 = CALCULATE(SUM(activities[TimeSpent]),activities[Activi...
- 2 years ago
Hi Anonymous ,
My apologies, seems like you've already added up number of employees in your other table. In that case, you'll just need to do the sum:
Employees = SUM(employees[Number of employees])then divide the two measures:
Average Employee Time = VAR _Hours = [SUM_Activities12] VAR _Employees = [Employees] // Employees = SUM(employees[Number of employees]) RETURN DIVIDE(_Hours, _Employees)Based on your sample data I would return this expected output:
- 2 years ago
Hi,
PBI file attached.
Hope this helps.
Ashish_Mathur
Super User
2 years agoHi,
PBI file attached.
Hope this helps.
- Anonymous2 years agoNot applicable
Ashish_Mathur thank you, this really helped me. It turns out I had to change relations between the tables