Forum Discussion
Anonymous
4 years agoNot applicable
SUMMARIZE returning errors (cannot convert to scalar value)
I have an employee directory that lists every employee in the company, along with the office they are assigned to. I need to provide a measure that tells us what percentage of our offices have 10 or ...
- 4 years ago
The SUMMARIZE function returns a table, but measures must return scalar values. That's why you get the error.
Here's a measure to get the number of offices with more than 10 employees
Offices >10 Employees = VAR _SelectedNumEmployees = 10 VAR _Result = COUNTROWS( FILTER( VALUES('Employee Directory'[Office - Assigned]), CALCULATE(COUNT('Employee Directory'[Employee ID])) > _SelectedNumEmployees ) ) RETURN _ResultYou could replace CALCULATE(COUNT('Employee Directory'[Employee ID])) in the above with a measure that counts number of employees.
Greg_Deckler
Community Champion
4 years agoAnonymous Are you creating a measure or a calculated column. You most likely want a measure.
Anonymous
4 years agoNot applicable
Greg_Deckler I've tried both, get the same error each time:
This is when I tried it as a column. Same error. I don't understand why it thinks I'm referencing multiple columns.