Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakqlikview_123
Specialist

Calculating ranks

Hi All,

I haveques as per below,
1 How to calculate rank for negative numbers

2How to calculate rankif there are both positive and negative numbers.

thanks,

Deepak

1 Solution

Accepted Solutions
jagan
Luminary Alumni

Hi Deepak,

Use Rank() like below

For Example

Dimension: Employee

Measure: Rank(Sum(Sales))

Employee with highest sales receives Rank1, and so on.  Whether it is positive or negative the rank is calculated based on the numbers.

Regards,

Jagan.

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III

Use the rank() function. Multiply by -1 if you want to rank from smallest to largest value so that the smallest value gets a rank of 1.


talk is cheap, supply exceeds demand
jagan
Luminary Alumni

Hi Deepak,

Use Rank() like below

For Example

Dimension: Employee

Measure: Rank(Sum(Sales))

Employee with highest sales receives Rank1, and so on.  Whether it is positive or negative the rank is calculated based on the numbers.

Regards,

Jagan.

deepakqlikview_123
Specialist
Author

Thanks both of you