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

Eliminar filas desplicadas en función del número más bajo

Estoy luchando para que esto funcione.

Esta es una pequeña parte de mi conjunto de datos. Mi conjunto de datos solo contiene TicketId, CommentId (no se muestra aquí, no es realmente importante) y CommentDuration. CommentDuration es una columna calculada.

werner1107_0-1597313313785.png

Lo que estoy tratando de lograr es eliminar filas con el mismo TicketId, manteniendo solo el CommentDuration más bajo. ¿Cómo puedo hacer esto? Preferiblemente como medida DAX...

Gracias de antemano

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

Hola @werner1107

Por favor, compruebe a continuación los resultados:

Measure = var a = CALCULATE(MIN('Table (2)'[CommentDuration]),ALLEXCEPT('Table (2)','Table (2)'[Ticketid]))
return 
IF(MAX('Table (2)'[CommentDuration])=a,a,BLANK())

07.PNG

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

3 REPLIES 3
v-diye-msft
Community Support
Community Support

Hola @werner1107

Por favor, compruebe a continuación los resultados:

Measure = var a = CALCULATE(MIN('Table (2)'[CommentDuration]),ALLEXCEPT('Table (2)','Table (2)'[Ticketid]))
return 
IF(MAX('Table (2)'[CommentDuration])=a,a,BLANK())

07.PNG

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
amitchandak
Super User
Super User

@werner1107 , Pruebe una medida como estas

sumx(summarize(table, table[TicketId],"_1",min(CommentDuration )),[_1])

O

sumx(values(table[TicketId]),min(CommentDuration ))

Fowmy
Super User
Super User

@werner1107

Cree una nueva tabla con el siguiente código (Ir a Modelado ab, 'en Cálculo, Nueva tabla

New Table = 

SUMMARIZECOLUMNS(
    TICKET[TicketID],
    "MinDur",
    MIN(TICKET[CommetnDuration])
)

________________________

¿He respondido a tu pregunta? Marque este post como una solución, esto ayudará a otros!.

Haga clic en el icono Thumbs-Up a la derecha si le gusta esta respuesta 🙂

YoutubeLinkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.