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
Jos13
Helper III
Helper III

RANKX con ALL()

Hola equipo,

Tengo 2 medidas para clasificar categorías y productos basados en ventas.

Category_Rank_All_Column - RANKX(ALL(Categories[CategoryName]),[Total Sales],,DESC)
ProductRanking á RANKX(ALL(Products[ProductName]),[Total Sales],,DESC)
Cuando selecciono categorías de segmentación de datos, products(Table2) se clasificó correctamente, pero las categorías (Tabla 1) no.
Rank.png
¿Puede alguien por favor decirme la razón de esto ?
Gracias de antemano
6 REPLIES 6

Hola

Había probado ALLSELECTED(). Sólo quería saber por qué la función ALL() da resultados diferentes.

Gracias

Si

Hola @Jos13 ,

Eche un vistazo a este video para entender la diferencia entre ALL() y ALLSELCTED() cuando se utiliza con RANKX.

https://www.youtube.com/watch?v=z2qzJVeYhTY


saludos

Harsh Nathani


Apreciar con un Kudos!! (Haga clic en el botón Pulgares arriba)

¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!

ALL elimina el filtro de todas las columnas, o una tabla, por otro lado ALLSELECTED solo tiene en cuenta cualquier filtro que esté activo fuera del objeto visual dado. en palabras más fáciles lo que está en el gran total es lo que ALLSELECTED devuelve.

@Jos13 , No estoy seguro de quién esta pregunta.

Pero Todo significa eliminar el filtro de esa columna en particular, tomar todos los valores, Todo seleccionado para tomar los valores seleccionados

Refiera estos detalles más

https://www.sqlbi.com/articles/the-definitive-guide-to-allselected/

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept...

Ashish_Mathur
Super User
Super User

Hola

¿Funciona?

=Category_Rank_All_Column á RANKX(ALLSELECTED(Categories[CategoryName]),[Total Sales],,DESC)


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.