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.
Hola a todos, estoy teniendo un poco de problemas haciendo que una idea funcione, quiero una columna que clasifique una lista de "agentes" en diferentes cuartiles (Q1,Q2,Q3,Q4), he leído todo alrededor del foro, pero no puedo conseguir que funcione.
Mis fuentes de datos son:
A) "DatosAgentes" con toda la información personal de los agentes
B) "bruto_llamadas", que se conecta a MySQL, dentro de B hay una lista de llamadas, con el AHT (Tiempo medio de manejo) y el identificador del agente o "Inicio de sesión",
Datos de ejemplo:
Un:
Iniciar sesión | Agente |
76000 | David |
76001 | Carlos |
76002 | Mario |
76003 | ARANTXA |
76004 | Maria |
76005 | MACARENA |
B)
UCID (IDENTIFICADOR ÚNICO) | Agente | Aht | Fecha |
LLAME AL NÚMERO 1 | 76001 | 485 | 04/11/2020 |
LLAME AL NÚMERO 2 | 76007 | 232 | 18/10/2020 |
LLAME AL NÚMERO 3 | 76003 | 339 | 31/08/2020 |
LLAME AL NÚMERO 4 | 76000 | 143 | 27/10/2020 |
LLAME AL NÚMERO 5 | 76003 | 480 | 28/08/2020 |
LLAME AL NÚMERO 6 | 76002 | 234 | 11/09/2020 |
LLAME AL NÚMERO 7 | 76000 | 248 | 06/11/2020 |
LLAME AL NÚMERO 8 | 76005 | 379 | 10/09/2020 |
LLAME AL NÚMERO 9 | 76002 | 412 | 17/10/2020 |
LLAME AL NÚMERO 10 | 76000 | 314 | 17/09/2020 |
LLAME AL NÚMERO 11 | 76007 | 452 | 14/09/2020 |
LLAME AL NÚMERO 12 | 76006 | 242 | 28/08/2020 |
LLAME AL NÚMERO 13 | 76005 | 481 | 16/08/2020 |
LLAME AL NÚMERO 14 | 76002 | 301 | 08/09/2020 |
LLAME AL NÚMERO 15 | 76007 | 374 | 13/08/2020 |
LLAME AL NÚMERO 16 | 76003 | 190 | 08/08/2020 |
LLAME AL NÚMERO 17 | 76001 | 226 | 06/10/2020 |
LLAME AL NÚMERO 18 | 76001 | 145 | 19/10/2020 |
LLAME AL NÚMERO 19 | 76007 | 203 | 22/08/2020 |
LLAME AL NÚMERO 20 | 76003 | 201 | 04/11/2020 |
LLAME AL NÚMERO 21 | 76000 | 301 | 06/09/2020 |
LLAME AL NÚMERO 22 | 76007 | 183 | 04/09/2020 |
LLAME AL NÚMERO 23 | 76001 | 167 | 07/10/2020 |
LLAME AL NÚMERO 24 | 76000 | 439 | 07/09/2020 |
Dentro (A) calculo el promedio de AHT(y aún más KPI) con esta fórmula "CALCULATE(AVERAGE(bruto_llamadas[TMO-1]),ALL(bruto_llamadas[TMO-1]))" dentro de TMO-1 son sólo las duranciones de llamada del mes actual.
Mi resultado deseado es así:
Agente | AHT(AVG) | Q |
David | 289 | 1 |
Carlos | 256 | 1 |
Mario | 316 | 3 |
ARANTXA | 303 | 2 |
Maria | 0 | - |
MACARENA | 430 | 4 |
Quiero clasificar a los agentes en 4 Q diferentes dependiendo de su TMO-1 promedio.
¿Me puedes ayudar?
Gracias.
Solved! Go to Solution.
Estás buscando esto???
Puede descargar el archivo de Excel... las medidas están en Power PivotPower Pivot .
Edición de la aceptación de postes para incluir las medidas:
Agent Average Handling Time:=AVERAGEX(
Agents,
[Average Handling Time]
)
Agent 1st Quartile:=PERCENTILEX.INC(
ALL(Agents),
[Agent Average Handling Time],
.25
)
Agent Quartile Bucket:=SWITCH(
TRUE(),
[Agent Average Handling Time] <= [Agent 1st Quartile], "1st",
AND(
[Agent Average Handling Time] > [Agent 1st Quartile],
[Agent Average Handling Time] <= [Agent 2nd Quartile]
), "2nd",
AND(
[Agent Average Handling Time] > [Agent 2nd Quartile],
[Agent Average Handling Time] <= [Agent 3rd Quartile]
), "3rd",
AND(
[Agent Average Handling Time] > [Agent 3rd Quartile],
[Agent Average Handling Time] <= [Agent 4th Quartile]
), "4th",
BLANK()
)
@DavidData descargar el archivo de nuevo desde el enlace anterior y echar un vistazo 🙂
Esa fue mi mala... poner la mesa dentro de la función ALL().
Así que para llegar a la salida deseada vas a necesitar otra medida que mire el AHT de un agente y lo compare con los valores del cuartil y luego asigne Q1, Q2, etc. Hemos detectado un problema desconocido.
SWITCH()
TRUE(),
[Agent AHT] < [1st Quartile], "Q1",
AND
[Agent AHT] >= [1st Quartile],
[Agent AHT] < [2nd Quartile
), "Q2",
AND
[Agent AHT] >= [2nd Quartile],
[Agent AHT] < [3rd Quartile
), "Q3",
AND
[Agent AHT] >= [3rd Quartile],
[Agent AHT] < [4th Quartile
), "Q4",
BLANK()
)
Lo siento, tal vez me lo he explicado mal. Sé que tendré que comparar el aht de cada agente con la diferente Q dentro de la tabla, pero el problema es que cuando calculo los cuartiles el cálculo se hace dentro de cada agente.
Estás buscando esto???
Puede descargar el archivo de Excel... las medidas están en Power PivotPower Pivot .
Edición de la aceptación de postes para incluir las medidas:
Agent Average Handling Time:=AVERAGEX(
Agents,
[Average Handling Time]
)
Agent 1st Quartile:=PERCENTILEX.INC(
ALL(Agents),
[Agent Average Handling Time],
.25
)
Agent Quartile Bucket:=SWITCH(
TRUE(),
[Agent Average Handling Time] <= [Agent 1st Quartile], "1st",
AND(
[Agent Average Handling Time] > [Agent 1st Quartile],
[Agent Average Handling Time] <= [Agent 2nd Quartile]
), "2nd",
AND(
[Agent Average Handling Time] > [Agent 2nd Quartile],
[Agent Average Handling Time] <= [Agent 3rd Quartile]
), "3rd",
AND(
[Agent Average Handling Time] > [Agent 3rd Quartile],
[Agent Average Handling Time] <= [Agent 4th Quartile]
), "4th",
BLANK()
)
EDITAR: Lo sentimos, no comproba el archivo, estoy comprobando cómo lo has hecho funcionar en Excel, ni siquiera sabías que podías hacer ese tipo de fórmula dentro de Excel. Gracias
Okey... así que.. su trabajo en parte, mantiene el mismo valor entre los agentes, por lo que es un plus, pero ahora una cosa que no especificé al principio, sí aplico filtros a los datos, como de qué servicio viene la llamada y necesito la Q para respetar los filtros,
Por lo que he visto hasta ahora calcula los cuartiles de todas las llamadas, no sólo las que he seleccionado en el filtro. ¿Cómo puedo hacer que funcione así?
¡Hola! No vi esta respuesta hasta ahora. Pide disculpas por el retraso 😔
Los cálculos de percentiles utilizan la función ALL en ellos. Cambie ALL a ALLEXCEPT e incluya los campos por los que desea filtrar. Por ejemplo ALLEXCEPT('Handing Times', [Date])
Sorry to bother you again, now it IS calculating with the correct data(thanks for the tip with allexcept, its working!) but I dont know why the number of agents per Q is not the same, when doing percentiles, well, quartiles, all 4 of them have to be the same size.
If you need me to send you the file or to screenshot all the formulas.. i dont mind if the file is kept private.
Current result:
Desired result:
Have to say even if its not working right now as I wanted, thanks for all your help @littlemojopuppy and patience, I come from an only excel enviroment and I've been trying with curses to make PowerBI work for me...
De acuerdo... los cálculos estaban dividiendo las llamadas en cubos de percentil basados en el tiempo, no en los agentes... permítanme modificar los cálculos. Le avisará cuando pueda descargar el archivo de nuevo.
A menos que me esté perdiendo algo, ¿no funcionaría esto?
PERCENTILEX.EXC(
Agents,
[Average AHC],
-- First Quartile, modify as appropriate for others
.25
)
https://docs.microsoft.com/en-us/dax/percentilex-exc-function-dax
Eso es lo que me sin embargo, pero cuando entro en esa fórmula muestra el primer cuartil para cada agente. (Cuartil - Q)
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 |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |