cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
slan2018 Frequent Visitor
Frequent Visitor

Calculating a percent using two measures

Hello,

 

I am working on an employee metrics chart and I cannot seem to get the productivity % calculation to work out

 

I have a few measures and i'm trying to create another measure to divide two of them: 

TimeSpent = calculate(sumx(UserStats, UserStats[Completed])*sumx(Tasks, Tasks[TaskTime])/60)
TimeSpent2 = sumx(UserStats, [TimeSpent])
ExpTime = sum(UserStats[Completed])
ExpTime2 = [ExpTime]*.875
 
I need to come up with a formula showing 
TimeSpent2/ExpTime2= Productivity %
 
For an example, in my case the values are as follows
 
TimeSpent2= 133.07
ExpTime2= 144.09
 
The result i'm expecting is 133.07/144.09=92.35%
 
What i'm getting is:
Pcent = divide([TimeSpent2],[ExpTime2])= 18.51%
 
I should also mention there are filters and slicers on my page. 
 
I'm not sure how to do this calculation correctly- any thoughts?

 

1 REPLY 1
Community Support Team
Community Support Team

Re: Calculating a percent using two measures

@slan2018 ,

 

You may try Table visual to check the result and modify the context.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.