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: 
Not applicable

Rank ?

Hi All,

How to Calculate in Rank in Back end Scripting  for the Getting the TOP 10 Customers...

Kindly help me on this...

Regards,

Helen

14 Replies
sunny_talwar

Would you be able to share a sample where it can be demonstrated?

sinanozdemir
Specialist III
Specialist III

As sunindia indicated it would be better if you could share a sample. Although, you want to see a working example, here is one for you:

In the back-end, I usually use Peek() function to rank the records:

Capture.PNG

This will give you the below data model:

Capture.PNG

And in the front-end, you can use nest Rank() with Aggr():

Capture.PNG

You use 1 in the set analysis so that ranking doesn't change based on users' selections.

I am attaching the qvw, hope this helps.

sunny_talwar

Just to add to what Sinan‌ mentioned, I have also used AutoNumber() function to create Rank, but it all depends on what is the exact requirement

Anonymous
Not applicable
Author

use order by in script to arrange your field value in a particular order (ASC or DESC) and then use rowno() function to identify the rank. Let me know if it helps.

Not applicable
Author

HI Sinan,

Thanks..

But I need to bring Top Customers, on the basis of Last 12 Months in back end, I need to show them in front ENd ..with Salesvalue

Regards,

Helen

Kushal_Chawda

You mean to say, customers having sales in last 12 months?

Not applicable
Author

Customers who are having top Sales in last 12 Months, I need to bring 10 Customers as Out put..

Last 12 MOnths: Sep-2014  to Aug 2015 having top Sales

Regards,

Helen

Kushal_Chawda

can you share some sample data?

Not applicable
Author

U can use this..