Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for
Did you mean:
Partner - Specialist

Ranking in ascending order

Hi All,

I have a requirement wherein I have to do the ranking of values in ascending order.  For Example lower the values, higher the rank.

Value    Rank

1           1

3             2

8             3

10           4

Can you please suggest how to use the Rank function to get the desired result.

Regards,

Raghav

23 Replies
Partner - Specialist
Author

Hi All,

I tried using '  - ' minus symbol before the expression using Rank function and I got the desired result.  But there are lot of zero values in my data because of non availability of data.  Is it possible to get these zero values ignored in the Ranking exercise.

Regards,

Raghav

Not applicable

Hi Raghav,

Here is the sample appln.find the attachment.

-Jai

Partner - Specialist
Author

Hi Jai,

Thanks for your reply.  I have lot of zero values in my data and want the Rank function to ignore zero values.  Can you suggest how to do it.

Regards,

Raghav

Not applicable

Hi Ravhav,

You can use below expression to ignore 0 in ranking (reverse ranking):-

SUM({\$<Value={"<>0"}>}Value)*-1)

FYI, I am multiplying the value with -1 to impose reverse ranking.

Rgds,

Dhananjay

Partner - Specialist
Author

Hi Dhananjay,

I tried below expression as suggested by you.... but the there is a rank assigned to Zero even now.

Rank((Sum({\$<[EcoCity]={"<>0"}[EcoCity])*-1),0,1)

Thanks and Regards,

Raghav

Creator III

Hi ,

I think the expression wriiten is not syntactically correct..

Rank

((Sum({\$<Amt={"<>0"}>}Amt)*-1),0,1)   try this and checkkk

Regards,

Ajay

Creator III

Hi ,

I think the expression wriiten is not syntactically correct..

Rank

((Sum({\$<Amt={"<>0"}>}Amt)*-1),0,1)   try this and checkkk

Regards,

Ajay

Hi ,

I think the expression wriiten is not syntactically correct..

Rank

((Sum({\$<Amt={"<>0"}>}Amt)*-1),0,1)   try this and checkkk

Regards,

Ajay

Hi ,

I think the expression wriiten is not syntactically correct..

Rank

((Sum({\$<Amt={"<>0"}>}Amt)*-1),0,1)   try this and checkkk

Regards,

Ajay

Hi,

I am unable to skip the rank for 0 value, but you can change the color  of the rank when the value is 0.

Have a look at the example

Regards,

Kashik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

Hi

I have modified,have a look.I hope it is working fine

-Jai

Community Browser