Discussion Board for collaboration on QlikView Scripting.
How to Calculate in Rank in Back end Scripting for the Getting the TOP 10 Customers...
Kindly help me on this...
Would you be able to share a sample where it can be demonstrated?
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:
This will give you the below data model:
And in the front-end, you can use nest Rank() with Aggr():
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.
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
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.
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
You mean to say, customers having sales in last 12 months?
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
can you share some sample data?
U can use this..