Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi All,
Refer below screen shot : I want to divide hours/Amount : 156 with billable hours(measure) 160.50 and expecting client utilization has .971 and similarly 4/160.50 and expecting .028, but right now it is dividing row by row giving 1. Please help me dividing billable hours total (160.5) by individual hours.
Solved! Go to Solution.
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
CurrentEmployeeH
then 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.
Make the change just on the 1st VAR, not on the line 3
I am getting zero.
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
CurrentEmployeeH
then same with Totalhours. Let us know
I am getting below error now.
Hi,
Sorry, try SELECTEDVALUE([Employee]) instead of [Employee] for the VAR CurrEmployee, ie :
VAR CurrEmployee=SELECTEDVALUE([Employee])
Let us know
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
76 | |
52 | |
39 | |
35 |
User | Count |
---|---|
92 | |
67 | |
54 | |
52 | |
46 |