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

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.

Reply
JVG
Frequent Visitor

Proyectado de bajas de empleados

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.

JVG_1-1672780333867.png JVG_0-1672780226562.png

 

Espero puedan ayudarme

¡Saludos! 🙂 

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @JVG ,

 

Please try:

First, create an index colum:

vjianbolimsft_0-1672799704537.png

vjianbolimsft_1-1672799718308.png

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:

vjianbolimsft_2-1672799754884.png

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.

View solution in original post

2 REPLIES 2
JVG
Frequent Visitor

Si me ayudó, muchas gracias!! 

v-jianboli-msft
Community Support
Community Support

Hi @JVG ,

 

Please try:

First, create an index colum:

vjianbolimsft_0-1672799704537.png

vjianbolimsft_1-1672799718308.png

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:

vjianbolimsft_2-1672799754884.png

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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