This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hola
Problema: Actualmente estoy tratando de comprender el DAX necesario para identificar a los titulares y a los que abandonan dentro de un informe de personal. Desafortunadamente, no se proporciona una fecha de inicio. También necesito la solución para habilitar los recuentos.
Soy un novato en PowerBi y DAX, pasé horas rastreando muchos otros ejemplos de problemas similares y no pude encontrar una solución que sea adecuada para su propósito o que pueda llevar a cabo.
A partir de tbl a continuación, esperaría poder devolver el Nombre 2 que quedó en el Mes 2 (2023-02) "Leaver" y el Nombre 6 que se unió en el Mes 2 "Starter".
El resultado sería una Mesa de Entrantes cada Mes y de Salientes cada Mes para la transparencia sería ideal.
| Identificación del empleado | Nombre | Fecha (mes del informe) |
| x1 | Nombre1 | 2023-01 |
| x2 | Nombre2 | 2023-01 |
| x3 | Nombre3 | 2023-01 |
| x4 | Nombre4 | 2023-01 |
| x5 | Nombre5 | 2023-01 |
| x1 | Nombre1 | 2023-02 |
| x3 | Nombre3 | 2023-02 |
| x4 | Nombre4 | 2023-02 |
| x5 | Nombre5 | 2023-02 |
| x6 | Nombre6 | 2023-02 |
Gracias a todos por su respuesta, muy apreciada.
Puedes probar esto
status =
VAR _last=maxx(FILTER('Table','Table'[Employee ID]=EARLIER('Table'[Employee ID])&&'Table'[Date (Report Month)]=EDATE(EARLIER('Table'[Date (Report Month)]),-1)),'Table'[Employee ID])
VAR _next=minx(FILTER('Table','Table'[Employee ID]=EARLIER('Table'[Employee ID])&&'Table'[Date (Report Month)]=EDATE(EARLIER('Table'[Date (Report Month)]),1)),'Table'[Employee ID])
return if('Table'[Date (Report Month)]<>max('Table'[Date (Report Month)])&&_next="","end",if('Table'[Date (Report Month)]<>min('Table'[Date (Report Month)])&&_last="","new"))
Date = if('Table'[status]="new",year('Table'[Date (Report Month)])*100+month('Table'[Date (Report Month)]),if('Table'[status]="end",year(EDATE('Table'[Date (Report Month)],1))*100+month(EDATE('Table'[Date (Report Month)],1))))
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.