Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
raghavsurya
Partner
Partner

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
raghavsurya
Partner
Partner
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

raghavsurya
Partner
Partner
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

raghavsurya
Partner
Partner
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

spsrk_84
Creator III
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

spsrk_84
Creator III
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

kaushiknsolanki

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

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
Not applicable

Hi

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

-Jai