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

Filtrar o agrupar elementos de una tabla, pero mantener la información en Power BI Desktop

Hola a todos,

Tengo la siguiente tabla y me gustaría filtrar o agregar la tabla de acuerdo con el criterio MIN (DurationSec). Como resultado, la ruta más rápida debe salir por nombre (con estación).

En este caso, no me importa si M o DAX.

Entrada:

NombreStation.NameRoute.DistanceMeterRoute.DurationSec
RumboSur3193465
RumboNorte5415748
RumboRehabilitación 28501877
RumboMedio11277981
RumboRehabilitación 17187990
RumboOeste97191193
PeajeNorte10203728
PeajeRehabilitación 110410930
PeajeOeste13273996
PeajeMedio2858462
PeajeRehabilitación 24215764
PeajeSur8601709

OUTPUT shoulb ser:

NombreStation.NameRoute.DistanceMeterRoute.DurationSec
RumboSur3193465
PeajeMedio2858462

Puede alguien ayudarme, por favor.

No es posible utilizar GroupBy o SUMMARIZE().

Paz.

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

Hola @denxx34

Avísame si quieres obtener los siguientes resultados:

Measure = var a = CALCULATE(MIN('Table'[Route.DurationSec]),ALLEXCEPT('Table','Table'[Name]))
Return
IF(MAX('Table'[Route.DurationSec])=a,a,BLANK())

005.PNG

Pbix adjunto.

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

4 REPLIES 4
denxx34
Frequent Visitor

El problema se resolvió de la siguiente manera:

0. "INPUT" (datos brutos)
1. Referencia con grupo por nombre MIN(DurationSec) "InputBest"
2. INNER JOIN "INPUT" + "InputBest" over Name & DurationSec -> OUTPUT


Consulte el archivo adjunto .pbix

En mi opinión, esa es la solución.

P.s.

¿Cómo puedo ofrecer el archivo pbix como descarga? 😐

v-diye-msft
Community Support
Community Support

Hola @denxx34

Avísame si quieres obtener los siguientes resultados:

Measure = var a = CALCULATE(MIN('Table'[Route.DurationSec]),ALLEXCEPT('Table','Table'[Name]))
Return
IF(MAX('Table'[Route.DurationSec])=a,a,BLANK())

005.PNG

Pbix adjunto.

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.
Greg_Deckler
Super User
Super User

Parece que puede usar Nombre en una visualización de tabla y, a continuación, usar MIN estándar para la distancia y la duración. Entonces tal vez esto para la estación: https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/td-p/985814


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hola @Greg_Deckler ,

Gracias por su rápida respuesta.
Sin embargo, no necesito una medida, sino una solución para toda la tabla, que luego reutilizo en otro escenario.

¿Tienes otra idea?

Gracias.

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.