Forum Discussion

pva's avatar
pva
Frequent Visitor
4 years ago
Solved

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!

  • Anonymous's avatar
    Anonymous
    4 years ago

    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
    )

    Best Regards

2 Replies

  • pva 

    is this what you want?

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    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
    )

    Best Regards