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

Necesita ayuda para formular una columna

Hola Expertos,
Soy nuevo en powerbi y agradecería su ayuda.
Tengo un ejemplo de datos como se muestra a continuación:

IdFecha
115-09-19
120-10-19
210-08-19
223-11-19
329-11-19
315-12-19
307-01-20

Expectativa: Quiero agregar una columna que contendría sólo valores True o False basados en la lógica a continuación
Para un id determinado, la fila con la fecha máxima debe mostrar True else False

La tabla esperada debería tener el siguiente aspecto:

IdFechaT/F
115-09-19F
120-10-19T
210-08-19F
223-11-19T
329-11-19F
315-12-19F
307-01-20T


Esperando la respuesta.
Gracias

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hola @Pratz203 ,

La fórmula @az38 crea es una medida.

eee6.PNG

Si desea una columna calculada, puede hacer lo siguiente:

eee4.PNG

Column = 
VAR x = 
CALCULATE(
    MAX([Date]),
    ALLEXCEPT(
        Sheet1,
        Sheet1[ID]
    )
)
RETURN
IF(
    [Date] = x,
    "T", "F"
)

eee5.PNG

View solution in original post

5 REPLIES 5
v-lionel-msft
Community Support
Community Support

Hola @Pratz203 ,

La fórmula @az38 crea es una medida.

eee6.PNG

Si desea una columna calculada, puede hacer lo siguiente:

eee4.PNG

Column = 
VAR x = 
CALCULATE(
    MAX([Date]),
    ALLEXCEPT(
        Sheet1,
        Sheet1[ID]
    )
)
RETURN
IF(
    [Date] = x,
    "T", "F"
)

eee5.PNG

Muchas gracias a ustedes @v-lionel-msft y @az38 por su ayuda y respuestas.
Siéntase feliz de ser parte de este complejo.
¡Mantengan el buen trabajo!

az38
Community Champion
Community Champion

Hola @Pratz203

tratar de una medida

Measure = 
var _maxDate = CALCULATE(MAX(Table[Date]), ALLEXCEPT(Table, Table[ID]))
RETURN
IF(SELECTEDVALUE(Table[Date]) = _maxDate, TRUE(), FALSE() )

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Gracias @az38 por la respuesta rápida, pero el siguiente comando me está dando un error después de RETURN

az38
Community Champion
Community Champion

@Pratz203

¿Cuál es el texto del error?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

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.