cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pva
Frequent Visitor

RANKING

Hola a todos!

 

Tengo una tabla como esta y necesito hacer un ranking como se muestra en la última columna ("Resultado"). ¿Cómo podría hacerlo?

 

CanalTV ShowHoras de retransmisiónResutado (valor buscado)
BBCLos Simpsons201
TV1Los Simpsons152
MTVLos Simpsons123
BBCJuego de tronos153
TV1Juego de tronos301
MTVJuego de tronos222

 

Muchas gracias!

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

Hi @pva ,

You can create a measure as follows if you want the rankings to be dynamically displayed according to the slicer's options or filters...

Measure =
RANKX (
    FILTER (
        ALLSELECTED ( 'Table' ),
        'Table'[TV Show] = SELECTEDVALUE ( 'Table'[TV Show] )
    ),
    CALCULATE ( SUM ( 'Table'[Horas de retransmisión] ) ),
    ,
    DESC,
    DENSE
)

yingyinr_0-1648108551775.png

Best Regards

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

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @pva ,

You can create a measure as follows if you want the rankings to be dynamically displayed according to the slicer's options or filters...

Measure =
RANKX (
    FILTER (
        ALLSELECTED ( 'Table' ),
        'Table'[TV Show] = SELECTEDVALUE ( 'Table'[TV Show] )
    ),
    CALCULATE ( SUM ( 'Table'[Horas de retransmisión] ) ),
    ,
    DESC,
    DENSE
)

yingyinr_0-1648108551775.png

Best Regards

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

@pva 

is this what you want?

Column = rankx(FILTER('Table','Table'[TV Show]=EARLIER('Table'[TV Show])),'Table'[Horas de retransmisión],,DESC)

1.PNG





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

Proud to be a Super User!




Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors