Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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
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
Regards,
Helen
can you share some sample data?
U can use this..