Forum Discussion
DAX | Average If Value > 0
- Anonymous9 years ago
If you wanted to literally average the values, it would be
= CALCULATE ( AVERAGE(Employee[Hours]), Employee[Hours] <> 0 )
Though, I can totally imagine other interpretations of "average" :)
Hi,
Are you after something like below? if yes, then you can create a measure like this - AVG = SUM(Table2[hours])/CALCULATE(COUNT(Table2[date]),ALLNOBLANKROW(Table2[hours]))
No, unfortunately the employees with no hours have "0.00" in the Charge Hours column so it is not blank. I would like to be able to find average hours for all employees for the month by service unit, department and total company but the 0's are throwing off the count of employees.
- Anonymous9 years agoNot applicable
If you wanted to literally average the values, it would be
= CALCULATE ( AVERAGE(Employee[Hours]), Employee[Hours] <> 0 )
Though, I can totally imagine other interpretations of "average" :)