Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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!:
Mastering Power BI 2nd Edition

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors