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
o59393
Post Prodigy
Post Prodigy

Rankx no se muestra correctamente en la clasificación

Hola a todos

Estoy usando una fucntion dax rankx para clasificar un colum llamado ingrediente 1 volumen.

Este valor sale dentro de una tabla denominada Query1.

El dax es:

Rank dax = RANKX(ALL(Query1), [Ingredient 1 volume dax])

Cuando arrastro la métrica, la clasificación se verá así:

ranking.png

Como se ve, la clasificación no se muestra correctamente. Así que mi pregunta es, ¿cómo puedo escribir el dax para aislar el resto de variables?

¿Debo deshacerme de la función ALL y su referencia a la tabla Query?

Sólo quiero clasificar el ingrediente 1 columna con cualquier filtro (año, país por ejemplo) que aplique.

Gracias.

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

Hola @o59393 ,

Podemos usar la siguiente medida para resolverlo.

Rank DAX =
RANKX (
    CALCULATETABLE ( DISTINCT ( 'Query1'[Merged] ), ALLSELECTED ( Quey1 ) ),
    CALCULATE ( [Ingredient 1 volume dax] ),
    ,
    DESC,
    DENSE
)

Si no funciona, ¿podría mostrar la fórmula de [Ingrediente 1 volumen dax] si no contiene ninguna información confidencial?


Saludos

Community Support Team _ Dong Li
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

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hola @o59393 ,

Podemos usar la siguiente medida para resolverlo.

Rank DAX =
RANKX (
    CALCULATETABLE ( DISTINCT ( 'Query1'[Merged] ), ALLSELECTED ( Quey1 ) ),
    CALCULATE ( [Ingredient 1 volume dax] ),
    ,
    DESC,
    DENSE
)

Si no funciona, ¿podría mostrar la fórmula de [Ingrediente 1 volumen dax] si no contiene ninguna información confidencial?


Saludos

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

¿Puedo añadir una condición de filtro a esta medida?

AiolosZhao
Memorable Member
Memorable Member

Hola @o59393 ,

1. ¿Su [Ingrediente 1 volumen dax] es una medida? En caso afirmativo, ¿podría mostrarlo, por favor?

2. ¿Podría mostrarme su modelo de datos?

Debido a que lo probé en mi escritorio, funciona.

Gracias.

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.