Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Correctly Weighting Average Handle Time (AHT) KPI in DAX

Hello Team,

 

I work in a call center where we have a set of KPIs, one of which is Average Handle Time (AHT) with a target of 600 seconds or less. For this metric, a lower AHT is better; for example, an agent with an AHT of 300 seconds is considered better than an agent with 600 seconds.

I need to assign a weight of 10% to this metric within the total KPIs, where agents who achieve an AHT of less than 600 seconds receive the full weight. I don't know how to create that can assume a higher AHT is not better when it should be the opposite.

 

Thanks,

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thank you for your prompt reply @Greg_Deckler 

 

Hi @Anonymous 

Based on your needs ,I have created the following table:

vjialongymsft_0-1717742860365.png

 

 

You can create the following formula to classify AHT, assuming <=600 is marked as "good" and >600 is marked as "bad"

Measure = IF(SELECTEDVALUE('Table'[AHT])<=600,"good","bad")

 

You can use the following DAX to calculate the percentage of time less than or equal to 600 seconds

KPI = DIVIDE(CALCULATE(COUNTROWS('Table'),FILTER('Table',[Measure]="good")),COUNTROWS('Table'))

 

Result:

vjialongymsft_1-1717743451584.png

 

 

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you for your prompt reply @Greg_Deckler 

 

Hi @Anonymous 

Based on your needs ,I have created the following table:

vjialongymsft_0-1717742860365.png

 

 

You can create the following formula to classify AHT, assuming <=600 is marked as "good" and >600 is marked as "bad"

Measure = IF(SELECTEDVALUE('Table'[AHT])<=600,"good","bad")

 

You can use the following DAX to calculate the percentage of time less than or equal to 600 seconds

KPI = DIVIDE(CALCULATE(COUNTROWS('Table'),FILTER('Table',[Measure]="good")),COUNTROWS('Table'))

 

Result:

vjialongymsft_1-1717743451584.png

 

 

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous , have you found any solution for it?

Anonymous
Not applicable

Thanks, @Anonymous for your reply. It works however my issue is that I need to have something like

Score Measure= IF(Table [AHT]<= 600, AHT Score* Weight (20%)). Based on this formula the system gives the employee who scored high AHT the highest score however in a metric like AHT the agent who hit high AHT shouldn't get the highest score since he is an outlier. 

Hope this is clear now

Greg_Deckler
Super User
Super User

@Anonymous Seems like a simple IF statement but Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.