Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'm trying to calculate average employee performance. For the sake of making this easier to explain, lets say employees have a number of tasks they need to complete weekly. The completion of those tasks is denoted weekly with a Yes (Y) or No (N). My intended result is the percentage of weeks where the employee completed all of the tasks.
So I need to evaluate each group of tasks by date (I figure a 1 if all tasks are complete, a 0 if not all tasks are complete) and then I need to average those (which is the easy part). I've tried to illustrate that flow below:
The part that I'm stuck on is evaluating each employees completion by date. I figure once I can get past that, averaging those ones and zeros will be easy.
Anyone have a good approach? It's probably very simple, and my brain is just fried.
Solved! Go to Solution.
Hi @Domenick
Please try
Score =
VAR SummaryTable =
SUMMARIZE (
Performance,
Performance[Employee],
Performance[Date],
"@Completed", IF ( ISEMPTY ( FILTER ( Performance, Performance[Task] = "N" ) ), 1, 0 )
)
RETURN
AVERAGEX ( SummaryTable, [@Completed] )
Hi @Domenick
Please try
Score =
VAR SummaryTable =
SUMMARIZE (
Performance,
Performance[Employee],
Performance[Date],
"@Completed", IF ( ISEMPTY ( FILTER ( Performance, Performance[Task] = "N" ) ), 1, 0 )
)
RETURN
AVERAGEX ( SummaryTable, [@Completed] )
Thanks! It's not producing the correct result. I'm trying to figure out why.
I got it to work! Thank you so much. Your code works brilliantly! 😊
@Domenick
Try this please
Score =
VAR SummaryTable =
SUMMARIZE (
Performance,
Performance[Employee],
Performance[Date],
"@Completed", IF ( ISEMPTY ( CALCULATETABLE( Performance, Performance[Task] = "N" ) ), 1, 0 )
)
RETURN
AVERAGEX ( SummaryTable, [@Completed]
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |