Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
raghavsurya
Partner - Specialist
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
raghavsurya
Partner - Specialist
Partner - Specialist
Author

Hi Ajay,

Tried the same.... still zero is not getting ignored.

Regards,

Raghav

spsrk_84
Creator III
Creator III

Hi,

In which chart you aare trying this..

If you are using Pivot then check whether the  "Supress Zero Values" is checked or not in Presentation tab.

can you attach the sample file...

Regards,

Ajay

spsrk_84
Creator III
Creator III

Hi,

In which chart you aare trying this..

If you are using Pivot then check whether the  "Supress Zero Values" is checked or not in Presentation tab.

can you attach the sample file...

PFA file

Regards,

Ajay

Not applicable

Hi,

    If you change the expression with "

Rank((Sum({$<SALES={"<>0"}>}SALES)*1),0,1) " it will work accordingly...

-Jai

Anonymous
Not applicable

did you ever solve this problem? I have the same one unfortunetly...

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

    Try this.

    if(Sum (SALES) > 0, rank( sum( SALES ),0,1),0)

Regards,

Kaushik Solanki

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

Thanks!

But my problem now is that there's no number 1 even if it is the lowest one. ranking starts with 5 if there were 4 zero values in the range.

I'm coloring the values that are highest and lowest and i do this by hardcoding them right now. do you have a better suggestion for me?

Thanks again!

//A.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi

   Please upload the file.

Regards,

Kaushik Solanki

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

here you go,

if you do changes and send it back i wont  be able to download it for some reson (probably firewall) so pleas write the expressions as long as you can!

Thanks!

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   I coudnt find anything starting from 5.

   Please take a screen shot and post here.

Reagards,

Kaushik Solanki

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