Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Ranking based on deviation from zero

Dear Experts,

We are having a business requirement where we want to rank the values based on deviation from zero.

the value which is having lowest positive difference from zero will get the rank 1.

Next postitive deviation will get rank 2. Then lowest negative difference will get rank 3 and so on.

For Example

   

PercentageRank
102
51
-23
-54

A quick response will be appreciated.

Regards,

Prashant Karanjgaonkar

1 Solution

Accepted Solutions
Not applicable
Author

Hi

Please use following expression

Rank((vMaxValue-VALUE)*(if(VALUE>=0,1,-1)))

View solution in original post

8 Replies
Chanty4u
MVP
MVP

try

=Firstsortedvalue(percentage,Field)

Not applicable
Author

Hi,

thanks for quick reply.

Can you help with a test application.

Chanty4u
MVP
MVP

simple example read below

FirstSortedValue()

techvarun
Specialist II
Specialist II

May be use a hidden expression like below

If(Percentage> 0,100- Percentage, Percentage -100)

and try Rank(Column(1)) as the actual rank expression

Not applicable
Author

Hi

Please use following expression

Rank((vMaxValue-VALUE)*(if(VALUE>=0,1,-1)))

Not applicable
Author

Rank((vMaxValue-VALUE)*(if(VALUE>=0,1,-1)))

pathiqvd
Creator III
Creator III

Hi,

Try this you will get solution,

=aggr(rank(if(Percentage>0,$(=max(Percentage))-Percentage,Percentage-$(=max(Percentage)))),Percentage)

Regards,

Not applicable
Author

superbbbbbbbb Amit Dubey.

Also thanks to  Prashant ,for such type of problem statement

Amit dubey ,can provide one test application for this,if yes it is very helpful.