Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Add rank column to table based on number of occurrences

$
0
0

I have a table and count the number of occurrences of a column value in a measure. This works fine.

 

CountOfColumn = COUNTROWS(FILTER(Table; Table[Column] = Table[Column]))

 

Now I would like to add a rank based on the count. so that the the entry with the most occurrences has rank 1, the next 2 etc.

This would make it possible to show the top n most frequent items.

 

I tried

 

RankByCountOfColumn = RANKX(Table; [CountOfColumn])

 

But the rank is always the same for each column although the counts are diffent.


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>