Forum Discussion

Angelo-Silva's avatar
Angelo-Silva
Regular Visitor
3 years ago
Solved

Ranking com duas colunas

Ola Especialistas,
Gostaria de criar um ranking com base em duas colunas, conforme imagem(Produto e Fornecedor), onde o contexto de produto será respeitado e também o fornecedor

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Angelo-Silva 

    1.You can create a measure

     

    Measure = RANKX(FILTER(ALLSELECTED('Table'),'Table'[Product]=MAX('Table'[Product])),CALCULATE(SUM('Table'[Valor])),,DESC,Dense)

     

    2.You can create a calculated column

    Column = RANKX(FILTER('Table',[Product]=EARLIER([Product])),[Fornecedor],,DESC,Skip)

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • hi Angelo-Silva 

    try like:

    Ranking =
    RANKX(
        FILTER(
            TableName,
            TableName[Products] = EARLIER(TableName[Products])
        ),
        TableName[Valor]
    )
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Angelo-Silva 

    1.You can create a measure

     

    Measure = RANKX(FILTER(ALLSELECTED('Table'),'Table'[Product]=MAX('Table'[Product])),CALCULATE(SUM('Table'[Valor])),,DESC,Dense)

     

    2.You can create a calculated column

    Column = RANKX(FILTER('Table',[Product]=EARLIER([Product])),[Fornecedor],,DESC,Skip)

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Hola 🙂

     

    I try to describe my case a bit:

     

    I would like to rank an amount of defects within 3 columns: month, plant and vendor column. Is that possible too by creating a custom column?