Forum Discussion
Anonymous
4 years agoNot applicable
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 different table, it does work as shown below
how do i fix this
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]))
2 Replies
- amitchandakSuper User
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]))- AnonymousNot applicable
I have tried the two measures and it is not working . it returns the same result as my rankx measure.
I need it to rank only on Columname in the table visual. help please