Percentile

Would like to know, how to get the percentile on the on grouped data (pivoted data).
Thanks,
Ganda

Would like to know, how to get the percentile on the on grouped data (pivoted data).
Thanks,
Ganda

Similar Messages

  • How to Calculate the Percentile in ABAP?

    Dear all,
    there was a old discussion http://scn.sap.com/thread/663993 about this topic.
    But there was no answer.
    Has anyone an idea?
    Kind regards
    Marcus

    hi,
    thanks for your anser, but it is not really the expected result.
    I have a table of results and i want a "percentile" of 0,75 like in excel.
    regards

  • How to claculate percentile at runtime?

    Hi All,
    I need to implement Percentile function in Function.
    The example scenario as follows:
    Data looks like below table.
    Position     country     sales
    1     Germany     £230.00
    2     Spain     £480.00
    3     Italy     £720.00
    4     UK     £990.00
    5     France     £1,200.00
    User will enter the percentile value(1 to 100 that means, 0.1 to 1.0), then bex varibale should receive values and calculates the percentile on keyfigure in the given example Sales is keyfigure.
    Please shed some ideas how to implement this scenario?
    Kind regards,
    Ravi

    Hi Ravi,
    One way of implementing it is by creating a formula variable(say xyz) with the processing type as Manual Input/Default Value.
    Then we can create a local formula in the query and write the formula here that you will be using to calculate the percentile.You can set the number of decimal places as 0.00 for this local formula.
    Hope it helps.
    VC

  • To calculate the 90th percentile in OBIEE

    Hi All,
    Can anyone help me how to calculate the 90th percentile in OBIEE.
    Thanks in advance;
    Rajeev.

    Hi,
    Expand the Dimensional Hierarchy that you have created and at the level where you need to stop the drill down-->open that level-->in general-->uncheck the 'Supports rollup to higher level of aggregation' and this should solve your problem.
    Otherwise if you need only till 4th level, then create till 4th level for hierarchy.
    Hope this should solve your problem.
    Regards
    MuRam

  • Percentile & percentage function in SQL or PL/SQL ?

    Hi all,
    I was wondering if there is any
    Percentile or percentage functions in SQL or PL/SQL  to calculate ??
    I came across percentile_rank , but i didnt find really good example online .... so i wasnt sure if thats right function for calculating  percentile Any example will be great !!
    THank you so much !!!

    Thank you so much frank and tubby !! It just amazing to see so many powerful aggregate and anlytic functions are available in 11g.
    Here is the example data i was working on
    with x as (
    select '100' value_amt, '6' cnt  from dual union all
    select '200' value_amt, '5' cnt  from dual union all
    select '500' value_amt, '10' cnt  from dual union all
    select '700' value_amt, '12' cnt  from dual union all
    select '900' value_amt, '14' cnt  from dual )
    select * from x;
    I m trying to calucalte the column called "avg_value" by dividing " value_amt / cnt ". I was just wondering if i need to use any function to calculate
    Here is the column "avg_value" look like
    with y as (
    select '100' value_amt, '6' cnt, '16' avg_value  from dual union all
    select '200' value_amt, '5' cnt,  '40' avg_value from dual union all
    select '500' value_amt, '10' cnt, '50' avg_value from dual union all
    select '700' value_amt, '12' cnt,  '58.33'avg_value from dual union all
    select '900' value_amt, '14' cnt, '64.28' avg_value   from dual )
    select * from y;Thank you so much!! I really appriciate it !!

  • How to create Percentile Table format

    I have table below i am looking write tsal For Dashboard purpose.
    Actually I want to create parameter Dynamically: if I give value
    parameter = 10% this splitting like below: 100/10
    parameter = 25%
    1-25
    26-50
    Parameter =5% rang  
    1-5
    6-10
    11-15
    16-20
    I need Dynamic Input

    DECLARE @forumTable TABLE (value float)
    WHILE (SELECT COUNT(*) FROM @forumTable) < 50
    BEGIN
    INSERT INTO @forumTable (value)
    VALUES (ROUND(((20 - 0- 1)*rand())+0,2))
    END
    ;WITH pTile AS (
    SELECT MAX(value) AS pTileUpper, MAX(value)-(MAX(value)/10) AS pTileLower, 10 AS pTile
    FROM @forumTable
    UNION ALL
    SELECT (pTileUpper/10)*(pTile-1), (pTileUpper/10)*(pTile-2), pTile - 1 AS pTile
    FROM ptile
    WHERE pTile - 1 >= 1
    SELECT COUNT(*) AS cnt, pTile, pTile*10 AS pct, pTileLower, pTileUpper
    FROM @forumTable f
    INNER JOIN pTile p
    ON f.value BETWEEN p.pTileLower AND p.pTileUpper
    GROUP BY pTile, pTileLower, pTileUpper
    ORDER BY pTile
    I think this is something like what you want.
    First I set up a demo table to hold some random data for testing/demo. It just puts a bunch of random floats ranging from 0 to 20 in a table.
    Using that table, we use an rCTE to create a percentile lookup table, based on 10% increments.
    Finally, we can now join the percentile lookup to our table and group by the percentiles to display the following results:
    cnt pTile pct pTileLower pTileUpper
    1 4 40 0.8468712 1.1291616
    1 5 50 2.2583232 2.822904
    5 7 70 8.06544 9.40968
    10 8 80 11.7621 13.4424
    4 9 90 14.936 16.803
    6 10 100 16.803 18.67

  • Is percentile calculation supported by QD or WAD?

    Hi!
    Customer does not have access to Business Objects, Crystal Reports or similar but requires percentiles to be calculated at runtime.
    Customer wants 10th, 25th, 50th, 75th and 90th percentile of the employees' individual wages to be presented for whatever combination or drill-down of characteristics are selected in report. Eg first display is organizational units as a hierarchy, each unit should have the percentiles displayed and calculated on the wages of the employees for that unit. Also, minimum wage for each unit and total sum for wages for each unit should be presented.
    If user adds Gender from free characteristics, the percentile values should be re-calculated so that they are based on the employees' wages for each gender under each unit.
    Is this at all possible?
    Query Designer does not provide any options unless we predefine which characteristics we want to use and sort and index the data accordingly. This is not an option since user will analyse many scenarios and does not know beforehand which scenarios are applicable.
    Web Application Designer can offer median value (50th percentile) via context menu but only based on the subtotals and totals presented in query (eg total wage for organizational unit, not employees' individual wages).
    Only option as we see it now is to try to create an enhancement of context menu in WAD and use a customer exit to do the calculation and then send result back to query. But is this a solution? Will it even work? Can this work dynamically or must user make selection on menu for each re-calculation of the values? Will it damage performance?
    There is very little information about percentile calculations on forums or SAP help, is this not supported at all if customer does not use BO or similar?
    Please advice on solution or information about whether or not this is supported by BI.
    (links to info regarding enhancement and customer exit
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/7f853b175d214ee10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/47/a3d30269421599e10000000a42189c/content.htm)
    (System information: SAP Netweaver 7.0 EHP 1, suppport pack 8)

    Well, you're right. There is an amount of manual action required. And the condition does indeed look at the characteristics in the drill-down - so if employee no in not in the drill down, then the lowest granular data will not be taken into account.
    If you want to avoid that, you'll need a different approach. You could create a vanilla (without condition query) and write an APD to pull data from that query. The APD would then contain a routine to perform this calculation of the 10th percentile and that could be sent into a DSO and thereafter to a Cube. The same APD for 25th, 50th percentile etc. Eventually the target cube, for each Org Unit, would have one record for the 10th percentile, one for the 25th etc. The query could be built on this cube and could pick up the percentile required by the user.
    The trouble with this design is that you'll have to think of all possible combinations of characteristics (Org Unit, Gender etc) and use the APD to calculate them. But I can't think of any other way to handle it either.
    Regards,
    Suhas

  • Help to get percentile value in MDX

    Hi,
    I would really appreciate if anyone could give me a MDX statement that
    returns percentile value. For example, the 90th percentile of store sales.
    Please do not point me to using Excel.
    Thanks,
    Idan

    hi,
    >>In MM how can i get text values from excpetion ocurred in ccBPM ?
    this is not possible
    Regards,
    Michal Krawczyk

  • To calculate the percentiles of a data column

    Hello!
    I want to calculate the percentile 25 and 75   or (25%, 75%) of a data colum's. There is some labview block to calculate it. Someone knows somw way to calculate using another statistical labview block and then obtain the values i want.
    Thank you very much.
    Larson

    convert the column into an array of numbers, sort the array, take the size of the array and divide by 4, this gives you the index of the first quartile, x2 is the second quartile, x3 is the third.

  • How can i calculate the percentile rank?

    How can I calculate where in percentile terms a single value falls within a array of many values?
    In excel it is:
    5
    10
    12
    11
    26
    18
    14
    11
    16
    19
    =PERCENTRANK(A1:A10,10) = 0.111
    Thanks!

    Average or Mean:
    sum_of_N/N
    Here N is the number of marks.
    sum_of_N is the total sum of n(all marks added together)
    public int average(int[] marks) {
    int sum;
    sum = 0;
    for(int i=0;i < marks.length;i++) {
    sum=marks[i]+sum; // keep adding to the total
    return average = sum/marks.length;
    // warning- using an int here can be a pitfall(we could have a decimal outcome).
    }

  • How to lookup percentile table and Records table For Dashboard purpose?

    Hi Folks,
    I have Created one USP_Storedprocedure : whic is create table 1 results, I have another stored procedure
    which has N no of columns. But For the dashboard purpose I want 2 columns only (whic are 
    table 2 sample Results, that table held N no of rows that will vary every month ) 
    my Requirement is i wnat to look up boath tables using T-Sql or any other. I neeed to find % of each  person value:
    i am excepingting this code for second table person %
    Select PersonID,((Value * 100)/(Select MAX(values)
    From XX Table) From XX Table
    ?? how can I lookup boath tables can you please advise me thanks in advance

    Hi Cherkuri
    What I understand from your statement, you want to get the percentile no in table 1 for each record in table 2.
    Below is my proposed solution and its output:
    DECLARE @Table1 AS TABLE
    PercentileNo INT,
    Per1 INT,
    Per2 INT
    DECLARE @Table2 AS TABLE
    Person_ID VARCHAR(50),
    Value INT
    INSERT INTO @Table1
    SELECT 1, 1, 10
    UNION SELECT 2, 11, 20
    UNION SELECT 3, 21, 30
    UNION SELECT 4, 31, 40
    UNION SELECT 5, 41, 50
    UNION SELECT 6, 51, 60
    UNION SELECT 7, 61, 70
    UNION SELECT 8, 71, 80
    UNION SELECT 9, 81, 90
    UNION SELECT 10, 91, 100
    INSERT INTO @Table2
    SELECT 'person1',12
    UNION SELECT 'person1',11
    UNION SELECT 'person2',5
    UNION SELECT 'person3',18
    UNION SELECT 'person3',16
    SELECT * FROM @Table1 t
    INNER JOIN @Table2 t2 ON 1=1
    WHERE t2.Value BETWEEN t.Per1 AND t.Per2
    Below is the output:

  • Error using percentile excel function in Xcelsius 2008 5.3.0

    Hi everybody.
    I'm doing an Xcelsius Dashboard and I need to show a percentile value in a line graphic component.
    Even I've read that "percentile" Excel function is supported by Xcelsius (Xcelsius 2008 SP3 User Guide), I get an error when trying to preview SWF.
    This is the error:
    "Incompatible Excel Function".
    Anybody knows what's happening?
    My Xcelsius version is:
    Xcelsius Enterprise 5.3.0.0
    Compilation 12,3,0,670
    (Spanish)
    Thanks in advance.

    I had a similar experience with formula Weeknum. I had the Dutch Excel version installed and used the Dutch version of the formula, it did not work same message. Then I tried the formula in English,  of course Excel could not execute it, BUT Xcelsius did work fine.
    So I guess you have the Spanish Excel installed also, try both languages.

  • Possible new percentile function?

    Hi,
    I'm running "Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production".
    I need to calculate percentiles, so I believe I have two choices: PERCENTILE_CONT() or PERCENTILE_DISC().
    I also need to get the same results as the SPSS and SAS tools.
    Comparing the results, neither of the Oracle versions give the same result as SPSS/SAS. I think this is due to how Oracle determines what row numbers to use.
    Oracle takes row RN = (1+ (P*(N-1)) where P is percentile and N is number of ordered rows.
    For PERCENTILE_CONT(0.1) from a 16 row set that would give row 2.5 as the starting point.
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/functions115.htm
    SPSS and SAS uses the formula RN = P*(N+1) which gives row 1.7 for a 16 row set.
    Now, would it be possible for me to write a PERCENTILE_SPSS() function?
    The samples of analytical/pipelined functions I have seen (and written) are happy to use the rows in the set one by one, to calculate some special min/max/avg/etc.
    For this function I would need either
    1 - to know the number of rows in the set, from the first call of my function, and calculate the percentile as my function "passes" the desired rows
    or
    2 - save all values in the set and calculate the percentile at the end
    The first sounds impossible, the second sounds expensive for a large table.
    Any suggestions?
    Kind regards
    Tomas

    You'll be more successful in the forums if you focus on the issues, questions and suggestions rather than make assumptions about why those questions or suggestions are being asked or made. Your unwarranted personal comments are unprofessional and indicate a lack of maturity.
    My questions were, and are, solely to elicit information about your actual issue so that suitable solutions or workarounds can be determined. There was no 'lecture' anywhere in any of the information that I provided; just statements and quotes from experts.
    The articles and quotes I provided were intended to show you that there isn't a universal agreement on a definition for those 'percentile' calculations. That would signal at least a 'caution' flag.
    >
    I'm asking if it's possible to write a custom-made analytical function when the formula needs to know the record count.
    >
    Yes - it is possible. In my opinion it isn't feasible. Any attempt to reproduce the exact proprietary algorithm that any vendor uses would require knowledge about the internals of that vendor's code that jsut aren't likely to be known or available: what precision is being used for intermediate results? What rounding methods are being used? What is the exact order of operations. Were any of those factors changed between versions. Did the vendor make any bug fixes?
    Any testing you do with any manageable set of test data won't ensure that there aren't data sets that will produce slightly different results.
    So writing such a function is one thing; trying to duplicate existing functionality is something else. The vendor's own implementation may have changed due to bug fixes so the results from that vendor may depend on the actual version being used.
    >
    Oracle does not have to match, I've never said that.
    My report, running in Oracle Reports, do need to match the results of an old report.
    >
    Well I read that as saying that Oracle does need to match. Your second sentence pretty much says exactly that.
    Again, my question was to try to understand why Oracle needed to produce a NEW report from OLD data that matches information in a PRINTED report from the past. That is a very unusual requirement. I've never run across such a requirement in more than 30 years and I have written thousands of reports using Crystal Reports (now BO), Oracle Reports, RPG and many other tools.
    It is often not possible to reproduce ANY report from the past due to the ever-changing nature of the data in the database. Data gets updated, deleted, inserted even when it shouldn't.
    >
    I have considered typing in the old values and selecting them.
    >
    That is the only method guaranteed to produce the same results. And that is about the only method that will pass the stringent auditing and Sarbanes-Oxley requirements that many organizations have to abide by. Those auditors won't allow you to just change the data to make things come out the way you want. You have to PROVE the provenance of the data: where did every piece of data come from, what changes were made to it (and when and by whome) and how were any accumulations performed.
    Using a custom function and merely showing that the results, on paper, match would not sway any auditor I've ever had to deal with. You may not have an issue of having to prove the data. That's why we are asking questions. To try to understand what options are viable for you.
    >
    That would mean I'd have to use SPSS to produce future values to store.
    >
    Yep! That's one of the main drivers for a lot of the ETL processes that exist. There are multiple systems of record. A PeopleSoft system might be the SOR for Inventory while an Oracle financials system might be the SOR for the financial and payroll data. ETL tries to merge and match the data. Trying to keep those ETL processes up to date with the changes going on in all of the source systems is a MAJOR headache.
    The standard solutiion for that use case is to select an SOR for reporting and then create ETL processes that bring the SOR data from each source system to the reporting SOR. For your use case that might mean using SPSS to produce data in report-ready tables and then use ETL to bring that data to the report server where it can be merged with data from other systems.
    >
    That's just too much manual labour for my taste.
    >
    Welcome to the real world!

  • Finding the 65-th percentile

    Dear Gurus,
    I understand that there are functions in BEx for calculating percentages in BI Reports.
    There is a requirement from the client for calculating the 65 th <b>Percentile</b> (Not Percentage) of a keyfigure based on a specific characteristic for a particular year. The report consists of only a single row. The value of the keyfigure pertaining to the 65 th percentile is to be displayed under that Keyfigure column.
    Your help and suggestions will be much appreciated. Thanks in advance.
    Regards,
    Arun.

    Dear Roberto, Thanks for the reply.
    The keyfigures have to be ranked based on their individual values. Then say if there are 100 values for that specific key figure, the 65 th percentile refers to the value of the keyfigure corresponding to the Rank 65.
    The report consists of three columns and one row.
    The query churns out 1000 records based on the following filter conditions and finds the Keyfigure X and Y for each record.
    1. 0CalYear
    2. Characteristic A, B and C
    The report consists of 0Calyear, Characteristic B and Keyfigures X and Y. There will be only one row. Under the Keyfigure X, its corresponding 65th Percentile has to be displayed.
    Kindly advice me on proceeding further.
    Regards,
    Arun.

  • Percentile in a collection. This should be easy but....

    I want to find the 80th percentile in the list of numbers in a collection.
    I have loaded data into a nested table:
    Type type_NumTable is TABLE OF Number;
    tbl_LocalScores type_numTable := type_numTable();
    I thought I could use Table() to accomplish this; however, the following comand
    select trunc(PERCENTILE_CONT(.80)) WITHIN GROUP (ORDER BY column_value DESC))
    into LocalTolerance
    from Table(tbl_LocalScores);
    gives me an error of
    320/52 PLS-00642: local collection types not allowed in SQL statements
    320/46 PL/SQL: ORA-22905: cannot access rows from a non-nested table item
    320/5 PL/SQL: SQL Statement ignored
    Can someone give me a hint as to what I'm missing or a suggestion on how to accomplish finding the 80th percentile within a collection.
    Thanks
    Larry

    user6282899 wrote:
    Can someone give me a hint as to what I'm missing or a suggestion on how to accomplish finding the 80th percentile within a collection.Well, hint is in the error message - do not use local collection types. Use SQL types. For example:
    CREATE OR REPLACE Type type_NumTable is TABLE OF Number;Or better use oracle defined type sys.OdciNumberList:
    declare
        tbl_LocalScores sys.OdciNumberList := sys.OdciNumberList(1,3,17,22,25,99,56);
        LocalTolerance number;
    begin
        select  trunc(PERCENTILE_CONT(.80) WITHIN GROUP (ORDER BY column_value DESC))
          into  LocalTolerance
          from  table(tbl_LocalScores);
          dbms_output.put_line(LocalTolerance);
    end;
    5
    PL/SQL procedure successfully completed.SY.

  • Calculate average of values below a specified percentile

    Is there a way to calculate a crosstab summary of average while excluding the highest 10% from the record selection? I.e., I would like to find the average of the values below the 90th percentile.

    Calculate the 90 percentile value
    pass this ( and any other parameters) to a sub report
    which then filters by the percentile

Maybe you are looking for

  • Sending mail to multiple recipients

    Hello friends, i have written java code for sending mail,its working fine for single mail address. if we include multiple mail address its giving ERROR:" Illegal route-addr in string" , so friends if there is any solution for this problem: please kin

  • Disappearing text in pdf form

    Hello, we have an application using pdf forms. The reader 9..1.0 reads some data and forms are filled out. there are 3 pages datas an 10 pages  for entering text. Each page contains automatically name and birth date of a patient, on the 10 pages the

  • Max Tablespace Size in 10.2.0.3

    Hi, Any idea how bigger a Tablespace can grow/created in 10g? I have a requirement to create 1.4TB of tablespace. I am pushing it back to break into chunks, but in worse case scenario I may have to create it!! So any suggestions will be honored. Than

  • PDF viewer for Java

    I looking for a java package to display pdf Files (Freeware). Thanks Mathias

  • 1 item awaiting download?

    My desktop version of iTunes is 10.6.3 (25) with OS X 10.6.8. On my Account Info page is the message: You have 1 item awaiting download.  Yesterday when a movie purchase was delayed because of an Apple message, "Credit Card processing is currently un