Forum Discussion
Calculating agent rankings
- Anonymous2 years ago
Hi ajdm2007
Agree with Wilson_
Your DAX formula for calculating agent ranking based on various performance metrics is well-structured and thoughtfully considers multiple factors.
One bit of advice I can think of is that if you have a large amount of data, consider using the SUMMARIZE function to filter the “dendesk” table first, pre-summarizing may reduce the duplication of calculations.
A sample of my DAX formula is as follows:VAR TicketsSolvedSummary = SUMMARIZE( FILTER(zendesk, zendesk[Status] = "Solved"), zendesk[Priority], "PriorityCount", COUNTROWS(zendesk) ) VAR TotalTicketsSolvedHighPriority = CALCULATE(SUMX(TicketsSolvedSummary, IF(zendesk[Priority] = "High", [PriorityCount], 0))) VAR TotalTicketsSolvedLowPriority = CALCULATE(SUMX(TicketsSolvedSummary, IF(zendesk[Priority] = "Low", [PriorityCount], 0))) VAR TotalTicketsSolvedNormalPriority = CALCULATE(SUMX(TicketsSolvedSummary, IF(zendesk[Priority] = "Normal", [PriorityCount], 0))) VAR TotalTicketsSolvedUrgentPriority = CALCULATE(SUMX(TicketsSolvedSummary, IF(zendesk[Priority] = "Urgent", [PriorityCount], 0))) VAR TotalTicketsSolvedUncategorized = CALCULATE(SUMX(TicketsSolvedSummary, IF(zendesk[Priority] = "Uncategorized", [PriorityCount], 0)))
Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ajdm2007
Agree with Wilson_
Your DAX formula for calculating agent ranking based on various performance metrics is well-structured and thoughtfully considers multiple factors.
One bit of advice I can think of is that if you have a large amount of data, consider using the SUMMARIZE function to filter the “dendesk” table first, pre-summarizing may reduce the duplication of calculations.
A sample of my DAX formula is as follows:
VAR TicketsSolvedSummary = SUMMARIZE(
FILTER(zendesk, zendesk[Status] = "Solved"),
zendesk[Priority],
"PriorityCount", COUNTROWS(zendesk)
)
VAR TotalTicketsSolvedHighPriority = CALCULATE(SUMX(TicketsSolvedSummary, IF(zendesk[Priority] = "High", [PriorityCount], 0)))
VAR TotalTicketsSolvedLowPriority = CALCULATE(SUMX(TicketsSolvedSummary, IF(zendesk[Priority] = "Low", [PriorityCount], 0)))
VAR TotalTicketsSolvedNormalPriority = CALCULATE(SUMX(TicketsSolvedSummary, IF(zendesk[Priority] = "Normal", [PriorityCount], 0)))
VAR TotalTicketsSolvedUrgentPriority = CALCULATE(SUMX(TicketsSolvedSummary, IF(zendesk[Priority] = "Urgent", [PriorityCount], 0)))
VAR TotalTicketsSolvedUncategorized = CALCULATE(SUMX(TicketsSolvedSummary, IF(zendesk[Priority] = "Uncategorized", [PriorityCount], 0)))
Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Anonymous ,
That's the kind of answer I was looking for, thanks for that golden nugget.
Have a good one.