Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Rankx function didn't work well when introduce a column from another table

I have a table visual that shows Rank columnName by countofReports   RANKX(ALLSELECTED(Table[ColumnName]),CALCULATE([Count])) This work fine but when I introduce another column Type from d...
  • amitchandak's avatar
    4 years ago

    Anonymous , measure rank is based on row context. So if add any other column than what you used in Rank, Rank it will readjust itself inside that additional column

     

    so you need like

     

    RANKX(ALL(Table[ColumnName], Table[Type]),CALCULATE([Count]))
    
    or
    
    RANKX(summarize(allselected(Table), Table[ColumnName], Table[Type]),CALCULATE([Count]))