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
Anonymous
Not applicable

Lead Lag Dax en power BI desktop

Hola

Necesito ayuda para crear un dax para obtener la fecha asignada y la fecha reasignada a los usuarios de acuerdo con el IDENTIFICADOR de trabajo único.

Así es como se ve la tabla ahora:

ID únicoFecha asignadaUsuario
121/05/2020Tom
129/05/2020Rick
221/05/2020Dan
210/06/2020Rick
321/05/2020Tom
329/05/2020Rick
310/06/2020Dan

Quiero obtener una columna de fecha reasignada que debe ser la fecha asignada de la siguiente persona para el mismo identificador único:

ID únicoFechaUsuarioFecha reasignada
121/05/2020Tom29/05/2020
129/05/2020RickNull
221/05/2020Dan10/06/2020
210/06/2020RickNull
321/05/2020Tom29/05/2020
329/05/2020Rick10/06/2020
310/06/2020DanNull

Gracias.

1 ACCEPTED SOLUTION

@cfpvin No comprome si @amitchandak solución funcionará o no, pero evitaré usar la función FILTER, ya que puede ser un éxito de rendimiento cuando se trabaja en un conjunto de datos grande.

Puede utilizar lo siguiente para agregar medida o columna

Column = 
VAR __date = CALCULATE ( MAX ( Data[Date Assigned] ) )
RETURN 
CALCULATE ( 
    MIN ( Data[Date Assigned] ), 
    ALLEXCEPT ( Data, Data[Unique ID] ), 
    Data[Date Assigned] > __date 
) 

Measure  = 
VAR __date = MAX ( Data[Date Assigned] )
RETURN 
CALCULATE ( 
    MIN ( Data[Date Assigned] ), 
    ALLEXCEPT ( Data, Data[Unique ID] ), 
    Data[Date Assigned] > __date 
) 

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

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados 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

4 REPLIES 4
amitchandak
Super User
Super User

@cfpvin , Pruebe una nueva medida como

Fecha reasignada
calculate(max(Table[Date Assigned]), filter(All(Table) , Table[Unique ID]-max(Table[Unique ID]) && Table[Date Assigned]>max(Table[Date Assigned])))

@cfpvin No comprome si @amitchandak solución funcionará o no, pero evitaré usar la función FILTER, ya que puede ser un éxito de rendimiento cuando se trabaja en un conjunto de datos grande.

Puede utilizar lo siguiente para agregar medida o columna

Column = 
VAR __date = CALCULATE ( MAX ( Data[Date Assigned] ) )
RETURN 
CALCULATE ( 
    MIN ( Data[Date Assigned] ), 
    ALLEXCEPT ( Data, Data[Unique ID] ), 
    Data[Date Assigned] > __date 
) 

Measure  = 
VAR __date = MAX ( Data[Date Assigned] )
RETURN 
CALCULATE ( 
    MIN ( Data[Date Assigned] ), 
    ALLEXCEPT ( Data, Data[Unique ID] ), 
    Data[Date Assigned] > __date 
) 

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

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados 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

@cfpvin lo que define a la siguiente persona, ¿es alfabeto o qué o en el orden en que mostró los datos? Tengo que tener alguna forma de ordenar para definir a la siguiente persona.



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.

Anonymous
Not applicable

@parry2k ordenación por el identificador único y la fecha asignada es bueno para obtener la siguiente fecha reasignada.

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.