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
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
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.