cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
betoavchar
Regular Visitor

DAX - Medida con calculo historico y cierre mensual para promedio

Buenas, 

 

Necesito crear una medida o una columna calculada, para obtener el siguiente dato. Tengo una tabla funcionarios con fecha de ingreso y egreso y tengo que ver cual es el saldo de FUNCIONARIOS ACTIVOS al cierre de cada mes, de manera historica. 

 

El objetivo en si es llegar a el PROMEDIO DE FUNCIONARIOS ACTIVOS en el Ej. economico, pensaba calcular el cierre de activos a cada mes y luego sacar el promedio por los meses transcurridos.

 

No logro darme cuenta si es mas facil con una medida o con una columna calculada. 

 

Desde ya muchas gracias!! 

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@Syndicate_Admin , Crear una medida como

Supongamos que económico también es una columna

nuevo =

var _month = eomonth(Max(Tabla[Fecha]),0)

devolución

Averagex (values(Table[economic]) , calculate(sum(Table[Value]), filter(allselected(Table), eomonth(Table[Date],0) = _month ) ))

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors