Forum Discussion
Rank Based on Measure
- 2 years ago
You can use RANK to do this, and it is fully dynamic an example of this would be below:
RANK(DENSE, ALLSELECTED( **** ) , ORDERBY( **** ,ASC), LAST, PARTITIONBY( **** ))Inside the ALLSELECTED, you must put any columns you would like to Rank by, if you are ranking people then this column must go here - and any other column you intend to use in your visual.
Inside the ORDERBY is the measure you wish to rank.
PARTITIONBY is optional, and gives you the freedom to reset the rank at certain points, for example you wanted a rank within each Area Director. If you do not need to break your rank at certain parts, simply remove:
, PARTITIONBY( **** )If this works for you, please mark it as the solution.
You can use RANK to do this, and it is fully dynamic an example of this would be below:
RANK(DENSE, ALLSELECTED( **** ) , ORDERBY( **** ,ASC), LAST, PARTITIONBY( **** ))
Inside the ALLSELECTED, you must put any columns you would like to Rank by, if you are ranking people then this column must go here - and any other column you intend to use in your visual.
Inside the ORDERBY is the measure you wish to rank.
PARTITIONBY is optional, and gives you the freedom to reset the rank at certain points, for example you wanted a rank within each Area Director. If you do not need to break your rank at certain parts, simply remove:
, PARTITIONBY( **** )If this works for you, please mark it as the solution.