Hola, espero puedan ayudarme
Quisiera hacer el siguiente calculo en una metrica, ya he intentado de varias maneras pero no he encontrado la manera, tengo una tabla calendario y mi tabla de registro de las bajas de empleados que van del año, y me gustaria proyectar las bajas los meses siguientes, sacando el promedio de las bajas que van del año, el resultado de este promedio se debería sumar al acumulado del ultimo mes con registros para el mes siguiente y así sucesivamente.
En la imagenes siguientes se muestra un ejemplo, en donde la columna C son los valores mensuales y B los acumulados.
Espero puedan ayudarme
¡Saludos! 🙂
Solved! Go to Solution.
Hi @JVG ,
Please try:
First, create an index colum:
Then apply the measure:
Measure =
var _a = CALCULATE(AVERAGE('Table'[Column1]),ALL('Table'))
var _b = ADDCOLUMNS(ALL('Table'),"Value",IF(ISBLANK([Column1]),_a,[Column1]))
return TRUNC(SUMX(FILTER(_b,[Index]<=MAX('Table'[Index])),[Value]))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Si me ayudó, muchas gracias!!
Hi @JVG ,
Please try:
First, create an index colum:
Then apply the measure:
Measure =
var _a = CALCULATE(AVERAGE('Table'[Column1]),ALL('Table'))
var _b = ADDCOLUMNS(ALL('Table'),"Value",IF(ISBLANK([Column1]),_a,[Column1]))
return TRUNC(SUMX(FILTER(_b,[Index]<=MAX('Table'[Index])),[Value]))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
Join the biggest FREE Business Applications Event in LATAM this February.
User | Count |
---|---|
3 | |
3 | |
2 | |
2 | |
1 |
User | Count |
---|---|
4 | |
3 | |
2 | |
2 | |
2 |