Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Couldn't get top N Records using Rank Node in Graphical Calc View

$
0
0

Hello,

 

In my requirement, I've to show Top N records from a table using Graphical Calculation View as Calc View is good in performance for handling huge amount of data.  Here, 'N' can vary depends on user's input.

 

I tried using Rank Node available in the calculation view.  But it ranks for a each and every particular data set and returning top N records of each data set.  But it doesn't gives Top N from overall data set.

 

For Ex: suppose consider following example:

 

YearValue
201410
201420
201430
201515
201525
201535
201460

 

Suppose if I've to get top 2 records, following should be the result:

Year     Value

2014     60

2015     35

 

But I get the following result after using rank node:

 

Year     Value

2014     60

2014     30

2015     35

2015     25

 

I used Threshold as 2, Order By: Value, Partition By Column: Year in my Graphical Calculation View.

 

How can we get the following result(to show top N records):

Year     Value

2014     60

2015     35

Using a Graphical calculation view.

 

Also, what I observed by using a Rank node in a calc view is, it's taking too much time for calculation and to display the result.

 

Please suggest.

 

with Regards,

Antony Jerald.


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>