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.
Escenario
Agregar una columna con Rol a la tabla de hojas de horas.
Cada empleado tiene un rol, que cambiará con el tiempo. Quiero buscar el rol del empleado en función de la fecha del parte de horas. El rol correcto se puede encontrar mirando la fecha del parte de horas. esta fecha debe estar en el intervalo de fechas de la tabla de roles de empleado.
Pregunta
¿Qué expresión se necesita?
Timesheets
Empleado | Fecha |
John | 1-3-2019 |
John | 1-3-2020 |
Chris | 1-8-2019 |
Chris | 1-9-2019 |
Rol de empleado
Empleado | Papel | Fecha de inicio | Fecha de finalización |
John | Personal medior | 1-1-2019 | 31-12-2019 |
John | Personal superior | 1-1-2020 | 31-12-2020 |
Chris | Personal junior | 1-6-2019 | 31-12-2019 |
Cristo | Personal medior | 1-1-2020 | 31-12-2019 |
Solved! Go to Solution.
@rbontje Estás buscando una búsqueda aproximada. Mira si este post ayuda a:
https://excelwithallison.blogspot.com/2020/06/dax-approximate-lookup.html
Utilice la medida y edición "bonus between" para sus datos:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
¡Gracias a los dos!
Allison es la ganadora 🙂
He hecho un pequeño ajuste para incluir también los resultados que están en la fecha de inicio o finalización. Esto no se mencionó claramente en mi primer post. < y > se reemplazan por < y > .
@rbontje , Una nueva columna en el parte de horas para obtener el rol
nueva columna ?
maxx(filter('Employee Role', 'Employee Role'[Start Date] <'Timesheets[Date] && 'Employee Role'[End Date] >'Timesheets[Date]
&& 'Rol de empleado'[Empleado] ?Hojas de horas[Empleado]),'Rol de empleado'[Rol])
@rbontje Estás buscando una búsqueda aproximada. Mira si este post ayuda a:
https://excelwithallison.blogspot.com/2020/06/dax-approximate-lookup.html
Utilice la medida y edición "bonus between" para sus datos:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
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 |