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
ALemmy
Frequent Visitor

buscar un empleado y devolver el rol basado en la entrada de la fecha se hizo

Hola pandilla

He estado recorriendo tantas preguntas como pueda y usted ha sido muy útil antes, así que tal vez alguien puede ayudarme de nuevo 🙂

Tengo dos tablas en un conjunto de datos más grande

Tabla 1:

Tiene todas las entradas de tiempo enviadas por todos los empleados (EMPLID) y la fecha en que se realizó la entrada (TRANSDATE)

Tabla 2:

Tabla de roles con fecha de inicio y finalización de los roles y promoción

El EMPLID se duplicará en la columna EMPLID si la persona ha tenido un cambio de "nombre de rol" en el sistema - cada cambio está marcado con la hora, el inicio (CREADO) y la fecha de finalización (fecha más reciente) del rol están al lado de cada ocurrencia del EMPLID en la tabla 2.

*si el rol no ha sido editado, volverá hoy a la fecha en la última fecha

ALemmy_0-1609781417387.png

Lo que tengo que hacer es buscar el EMPLID en la tabla 1 y la tabla 1 de TRANSDATE y hacer coincidir con el rol correcto NOMBRE para ese EMPLID en la tabla 2.

Solía tener una fórmula de búsqueda que funcionaba bien cuando no tenía duplicaciones EMPLID en la tabla 2, así que ahora necesito implementar este cambio para realizar un seguimiento de los cambios de roles en un proyecto e implementar la tasa correcta a lo largo de la vida del mismo.

Si alguien puede darme algún consejo realmente ayudaría a 🙂

Gracias a todos y FELIZ NUEVO Año

Anne

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@ALemmy probar esto como una nueva columna en la tabla de tareas, cambie col y nombre de tabla según el modelo.

Role = 
VAR __taskDate = Tasks[TaskDate]
VAR __empId = Tasks[EmpId]
RETURN
CALCULATE ( 
    LASTNONBLANK ( Emp[Role], TRUE() ), 
    __empId = Emp[EmpId],
    __taskDate >= Emp[Start],
    __taskDate <= Emp[End]
) 

Consulta mi última entrada de blog Año-2020, Pandemia, Power BI y más allá para obtener un resumen de mis versiones favoritas de las características de Power BI en 2020

Me gustaría elogios si mi solución ayudara. 👉 Si puedes dedicar tiempo a publicar la pregunta, también puedes hacer esfuerzos para dar Felicitaciones a quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!

Visítenos en https://perytus.com, su ventanilla única para proyectos/formación/consulta relacionadas con Power BI.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@ALemmy Apreciamos los comentarios y me alegro de que funcionó. Me gustaría decir que explicaste muy bien tu problema, y fue divertido trabajar con él. ¡¡Salud!!

Consulta mi última entrada de blog Año-2020, Pandemia, Power BI y más allá para obtener un resumen de mis versiones favoritas de las características de Power BI en 2020

Me gustaría elogios si mi solución ayudara. 👉 Si puedes dedicar tiempo a publicar la pregunta, también puedes hacer esfuerzos para dar Felicitaciones a quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!

Visítenos en https://perytus.com, su ventanilla única para proyectos/formación/consulta relacionadas con Power BI.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@ALemmy probar esto como una nueva columna en la tabla de tareas, cambie col y nombre de tabla según el modelo.

Role = 
VAR __taskDate = Tasks[TaskDate]
VAR __empId = Tasks[EmpId]
RETURN
CALCULATE ( 
    LASTNONBLANK ( Emp[Role], TRUE() ), 
    __empId = Emp[EmpId],
    __taskDate >= Emp[Start],
    __taskDate <= Emp[End]
) 

Consulta mi última entrada de blog Año-2020, Pandemia, Power BI y más allá para obtener un resumen de mis versiones favoritas de las características de Power BI en 2020

Me gustaría elogios si mi solución ayudara. 👉 Si puedes dedicar tiempo a publicar la pregunta, también puedes hacer esfuerzos para dar Felicitaciones a quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!

Visítenos en https://perytus.com, su ventanilla única para proyectos/formación/consulta relacionadas con Power BI.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Muchas gracias... honestamente y su desglose es muy útil para entender

ser bendecido

Anne

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.