Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakqlikview_123
Specialist
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
Partner - Champion III
Partner - Champion III

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
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
Partner - Champion III
Partner - Champion III

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
Specialist
Author

Thanks both of you