Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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]
User | Count |
---|---|
77 | |
77 | |
68 | |
67 | |
49 |
User | Count |
---|---|
108 | |
105 | |
93 | |
83 | |
64 |