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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Devolver un único valor basado en el valor máximo de otra columna

Tengo una tabla simple de dos columnas, similar en diseño a esta:

GrupoTotal
Rojo504
Verde714
Amarillo923
Azul258
Blanco432
Negro805
Naranja601
Morado80

from which I need to find the maximum value of Total, and the Grupo to which it belongs.

I use the MÁXIMO function to find the maximum Total, but how can I get the Grupo associated with that maximum?

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

¿ @AndrewPF

¿Algo así? ¿Es posible que tenga más de 1 Grupo para el Total máximo?

Vera_33_0-1644409648496.png

test = CALCULATE(VALUES('Table'[Group]),'Table'[Total]=MAX('Table'[Total]))

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

¿ @AndrewPF

¿Algo así? ¿Es posible que tenga más de 1 Grupo para el Total máximo?

Vera_33_0-1644409648496.png

test = CALCULATE(VALUES('Table'[Group]),'Table'[Total]=MAX('Table'[Total]))

Lo usé, y funcionó, gracias.

Pero luego lo probé con MIN:

test = CALCULATE(VALUES('Table'[Group]),'Table'[Total]=MIN('Table'[Total]))

y no devolvió el resultado correcto.

No hay duplicación entre los números.

¿Alguna idea?

Ignora el último mensaje.

También funciona con MIN.

Gracias

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.