Forum Discussion
Help required diving individual hours by total billable hours.
- 4 years ago
Can you test your variable, to see what it returns.
In the formula after RETURN replace the divide function and all its argument, by the name of the variable you want to test.
Check if CurrentEmployeeH and TotalHours are giving expected result.
RETURN
CurrentEmployeeHthen same with Totalhours. Let us know
Hi,
To get your usage percentage, you can do :
% by Employee =
VAR CurrEmployee = [Employee]
VAR CurrentEmployeeH = CALCULATE( SUM([Hours Amount]) , [Employee] = CurrEmployee , ALL ( [Clients] ) )
VAR TotalHours = CALCULATE( SUM([Hours Amount]) , ALL ( ) )
RETURN
DIVIDE ( CurrentEmployeeH , TotalHours )
Hope it helps
Thanks. I am unable to refer the Employee column in the sheet name utilization. Please refer below screenshot.
- AilleryO4 years ago
Memorable Member
Hi,
Sorry, try SELECTEDVALUE([Employee]) instead of [Employee] for the VAR CurrEmployee, ie :
VAR CurrEmployee=SELECTEDVALUE([Employee])
Let us know
- Anonymous4 years agoNot applicable
I am getting below error now.
- AilleryO4 years ago
Memorable Member
Make the change just on the 1st VAR, not on the line 3
- Anonymous4 years agoNot applicable
I am getting zero.
% by Employee =VAR CurrEmployee = SELECTEDVALUE(Utilization[Employee])VAR CurrentEmployeeH = CALCULATE( SUM(Utilization[Hours/Amount]) , (Utilization[Employee]) = CurrEmployee, ALL (Utilization[client names] ) )VAR TotalHours = CALCULATE( SUM(Utilization[Hours/Amount]) , ALL ( ) )RETURNDIVIDE ( CurrentEmployeeH , TotalHours )- AilleryO4 years ago
Memorable Member
Can you test your variable, to see what it returns.
In the formula after RETURN replace the divide function and all its argument, by the name of the variable you want to test.
Check if CurrentEmployeeH and TotalHours are giving expected result.
RETURN
CurrentEmployeeHthen same with Totalhours. Let us know