on 02-27-2013 3:30 PM
Hi All,
One of my requirements is to return a specified Percentile so I need a percentile calculation function for HANA.
In order to do this, I need to rank the data records by the specified value. It is then expected a user will enter in a percentile and only the value within that percentile is returned for the data record.
Below is an example of the logic and how this applies to the data.
The following raw data records are give, we need to get the 80% percentile:
ID Name Amount
1 Joe 100
1 Jane 30
1 David 200
1 John 10
1 Scott 50
Step 1: rank data records
ID Name Amount
1 John 10
1 Jane 30
1 Scott 50
1 Joe 100
1 David 200
Step 2: return record 80% percentile value.
In this case the 80% percentile value for ID 1 is 120
As far as I know, there are no standard ranking function in HANA. Do I need to use CE function to generate this logic – or is there a better method to do this?
How should I go about doing the percentile calculation?
Thanks for your help, any guidance will be appreciated.
You have percentile function in HANA.
PERCENTILE_DISC and PERCENTILE_CONT.
Check the follow link for more details
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
8 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.