Forum Discussion

jeanL's avatar
jeanL
Icon for Helper I rankHelper I
4 years ago
Solved

RANKX with filter

I am trying to display only top 10 in the table and have been looking up to try using TOPN and RANKX. But i have been having issue with rankx, with it displaying 1 rank across the table. The table ...
  • amitchandak's avatar
    4 years ago

    jeanL , Try TOPN like

    CALCULATE([total_teus], TOPN(10,ALLSELECTED(summary_table[od_pairs]),[total_teus],dense), ALLSELECTED(summary_table[od_pairs]))

  • CNENFRNL's avatar
    4 years ago
    rankings =
    RANKX(
        ALLSELECTED( summary_table[od_pairs] ),
        CALCULATE( SUM( [total_teus] ) )
    )