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
jtooke
Helper I
Helper I

Calcular la fecha más reciente por ID

Hola a todos,

Estoy intentando devolver una columna con la fecha más reciente por identificador para un conjunto determinado de datos. A continuación se muestra un conjunto de datos de ejemplo. En mi tabla tengo tres columnas Nombre, ID de nombre y Fecha. La cuarta columna sería una columna calculada y devolvería la fecha más reciente por la columna NameID única. ¿Hay alguna manera de que pueda hacer esto? ¡Gracias!

NombreNameIDFechaCALCULATED - Más reciente por ID de nombre
Marca13/15/20194/7/2020
John26/3/20206/3/2020
Tom38/7/202011/1/2020
Tom38/7/202011/1/2020
Tom38/7/202011/1/2020
Sarah42/1/20182/1/2018
Kim57/6/20177/6/2017
Marca14/7/20204/7/2020
Tom311/1/202011/1/2020
Steve63/2/20193/2/2019

1 ACCEPTED SOLUTION
ChrisMendoza
Resident Rockstar
Resident Rockstar

@jtooke - ¿Cumple con sus requisitos?

HASONEVALUE oculta la fila 'Total' de la medida.

Measure = 
IF(
    HASONEVALUE('Table'[NameID]),
    CALCULATE(
        MAX('Table'[Date]),
        ALLEXCEPT('Table','Table'[NameID])
    ),
    BLANK()
)

image.png






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

5 REPLIES 5
ChrisMendoza
Resident Rockstar
Resident Rockstar

@jtooke - ¿Cumple con sus requisitos?

HASONEVALUE oculta la fila 'Total' de la medida.

Measure = 
IF(
    HASONEVALUE('Table'[NameID]),
    CALCULATE(
        MAX('Table'[Date]),
        ALLEXCEPT('Table','Table'[NameID])
    ),
    BLANK()
)

image.png






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Gracias por la respuesta @ChrisMendoza. Cuando intento esta medida, todo lo que devuelve son espacios en blanco?

Intente a continuación primero y ver si le gusta la salida.

    CALCULATE(
        MAX('Table'[Date]),
        ALLEXCEPT('Table','Table'[NameID])
    )





Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Eso tampoco funciona del todo. Con esa fórmula la columna solo muestra la misma fecha que en la columna inicial.

Revise el adjunto






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



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.