Forum Discussion
webportal
8 years agoImpactful Individual
Calculate average within category
Hi, How to calculate the average of a measure within a category? For example, in my data model, I have a table "Geo" that contains the field "País" (Country). In table "Clientes" I have the ...
- 8 years ago
You're correct, I didn't type it right- here's what works for me in this situation:
Avg Jobs Per Day by Location = CALCULATE (FactFinanceTable[Avg Jobs Per Day],SUMMARIZE ('GeoHierarchyDimTable', GeoHierarchyDimTable[Location]), ALL(EmployeeDimTable[Name] ))
This gives me Average by Location properly.
webportal
8 years agoImpactful Individual
Hi,
CALCULATE requires an expression as the 1st argument, not a table.
CALCULATE requires an expression as the 1st argument, not a table.
wildmight2017
8 years agoAdvocate II
You're correct, I didn't type it right- here's what works for me in this situation:
Avg Jobs Per Day by Location = CALCULATE (FactFinanceTable[Avg Jobs Per Day],SUMMARIZE ('GeoHierarchyDimTable', GeoHierarchyDimTable[Location]), ALL(EmployeeDimTable[Name] ))
This gives me Average by Location properly.