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!

Similar Messages

  • Using Business Area and Profit Center Accounting with New GL functionality

    Hello,
    We are Public Sector and using ECC 6.0, we have been using Business Area with Fund Management. We also use Special Purpose Ledger with Document splitting. Before migrating to New GL functionality, we want to understand
    -     The possibility of using both Business Area and Profit Center Accounting, and the impact on the system
    -     If we activate Profit Center Accounting before migration, how will it work with the splitting process?
    -     If we migrate without Profit Center Accounting, will this cause the activation of Profit center accounting later to be more complicated, even if we migrate again?
    Thanking you

    Hi Sachin,
    Thank you for the reply, we want to know that
    -     The possibility of using both Business Area and Profit Center Accounting, and the impact on the system
    If we decide using Profit Center Accounting with Business Area with New GL functionality how we should do it
    -     should we activate classical Profit Center Accounting before migrating to New GL functionality, if we do this how will it work with the splitting process?
    -     If we migrate to New GL functionality without Profit Center Accounting, will this cause the activation of Profit center accounting later to be more complicated, even if we migrate again?
    Thanking you
    Tipu Khan

  • Smartview 11.1.2.1 toolbar-Add new/modify functionality without VBA

    Please help me with below questions
    1. Is it possible to add new custom functionality (like add new button/modify the existing functionality) in Smart view 11.1.2.1 toolbar or anywhere in Smart view main menu without using VBA?
    2. Can above mentioned changes brought on the server side, which would reflect on client; in other words, maintain code on server side; no need of installation.
    3. Is JAVA code supported by Smartview 11.1.2.1 as VBA; if yes then how it can be achieved?
    Product version:
    11.1.2.1.000

    Hi Anku,
    1. Is it possible to add new custom functionality (like add new button/modify the existing functionality) in Smart view 11.1.2.1 toolbar or anywhere in Smart view main menu without using VBA?With a little research, you can expose the Smartview menus and functionality using a .net project in Visual Studio.
    2. Can above mentioned changes brought on the server side, which would reflect on client; in other words, maintain code on server side; no need of installation.The Smartview client UI elements are derived from local msoffice APIs, and not managed at the server. The server is a web service and the only thing it knows is how to dispatch requests in the form of XML to the appropriate API (E.g. Essbase) and return the results to the client as an xml stream.
    3. Is JAVA code supported by Smartview 11.1.2.1 as VBA; if yes then how it can be achieved?No.
    Regards,
    Robb Salzmann

  • Migrating BPS New lines functionality to IP

    Hi Everyone,
           We are facing some issues in generating New rows in IP.
    Hers is the scenarion -
    We have some BPS Web pages with New lines functionality, which we want to migrate to IP/WAD.
    The current BPS page generates New lines based on the "Header" column for all the Lead columns & key figures
    We are trying to implement this functionality in IP without success
    We are using Grid for generating new rows. But this will work only if Input ready query finds no data.
    At the start of the Planning session , there will be no data. So, it will not work.
    Currently ,in BPS we are able to generate new rows based on the "Header" column (0Material).
    How can we accomplish similar functionality in IP/WAD?
    I would  appreciate your suggestions for resolving this issue.
    Thank you,
    Peter

    Hi Peter,
    check note 1149346 for more information about new lines functionality in BW-IP.
    Input-ready queries are much more dynmic than planning layouts, e.g. a drill-down in data columns is not possible in planning layouts. If the query returns no data the BW frontends don't know how many columns are to be rendered in a new line in e.g. the case of drilled-down characteristics in the data columns. Only the structure elements of the query are static. In the above case you have to put the characteristics in the rows or restrict the characteristic to one value. In this sense you can also compare a header combination with a free characteristics restricted to one value.
    Regards,
    Gregor

  • SAP NEW GL FUNCTIONALITY

    Hi all of you.
    I am working in UK based MNC in india. Just now there is a technical upgrade from 4.7 to ECC 6.0.
    Now they are going for Functional upgrade in which they will be going for activation of New GL functionality. Before that they want a presentation that how they will be benefitted with this(new gl functionality).What advantages they will be getting??.
    They are having 2 books of accounts.One for UK (Jan to Dec)  and other India (April to march).
    I have lot of ppts having explanation for New GL Concepts, but I want some data by which I can show them a comparision between old functionality(ie 4.7) and new functionallity(ie ecc 6.0).
    Advantages and specifices area where there normal work and month end closing work will be reduced.
    plz help me in this regards
    i will be giving points.
    Regards
    Sandeep Panwar

    Dear Sandeep,
    EEC -6
    in the New G/L Document splitting is there based on that u can get the PC and Segment reports.
    segment is the new concept in ECC - 6 (segment behalf of BA)
    in ur document entry just u enter the cost center or pft. for one line item. if u go for general ledger view
    system is showing the cost center and PC and Segment in all line items.
    coming to activation it is not possible in the online system.
    if any quaries plz. get back..............
    Regards
    radha

  • New preview function for iPad–error message "Multiple page sizes not supported"

    When I try to use the new preview function with my iPad I get the error message "Multiple page sizes within a layout are not supported". I have a page that is 768 x  1296. I would really like to preview this folio before publishing. Any suggestions?

    If you're trying to create an article that scrolls vertically, you can create a 768x1296 article in a 1024x768 folio, but you need to select a Smooth Scrolling option when you create or import the article, or in the Article Properties dialog box.

  • HELP- New VI function does not seem to work in Built Applicatio​n

    My Application is designed to coordinate several (16) separate test stations from one control. The test stations can run independently. I have a Test Manager application that launches independently running Test Runner VIs when the user has selected a test to run and the conditions to run it with. There can be 0 to 16 Test Runner VIs running at any given time. Each Test Runner VI uses the same template Test Runner.VI code but is given a unique Name based on a randomly generated GUID. I use a sequence of the New VI function, VI.FP.Open and VI.Run VI to create the VI based upon the template, give it a unique name and then launch it to run independently. See JPG fragment attached.
    This design works perfectly well when used in the LabView 2010 development environment. But it does not work when I build the Test Manager as an EXE application. There are no errors generated, but the new VI is not launched and I think that one of the functions in the sequence never returns. I am not sure if the New VI is created or not.
    Does anyone know how to modify this so that New VIs can be created, uniquely named and launched, that will work properly no matter whether the creating VI is running in either development (for debugging) or as a built application?
    Does the sequence New VI function, VI.FP.Open and VI.Run VI work when used in a Built application? Is there some other method that will work to serve this need?
    Is there a function in LabView that will launch an exe file like WinExec does? Perhaps I can use that.
    THANKS MUCH for any advice.
    Solved!
    Go to Solution.
    Attachments:
    New VI launch.jpg ‏38 KB

    Are you using any paths in your VI?
    I do see the Application Directory in the image you posted.  Do you have other paths?
    Do you use the same computer that you developed with to run the executable?
    You can create indicators for the paths and confirm that they are okay.  Do you automatically close the front panel when closing the application?
    If so, you can disable that portion of the code, re-build the code and look at the paths and any error message.
    dbaechtel wrote:
    My Application is designed to coordinate several (16) separate test stations from one control. The test stations can run independently. I have a Test Manager application that launches independently running Test Runner VIs when the user has selected a test to run and the conditions to run it with. There can be 0 to 16 Test Runner VIs running at any given time. Each Test Runner VI uses the same template Test Runner.VI code but is given a unique Name based on a randomly generated GUID. I use a sequence of the New VI function, VI.FP.Open and VI.Run VI to create the VI based upon the template, give it a unique name and then launch it to run independently. See JPG fragment attached.
    This design works perfectly well when used in the LabView 2010 development environment. But it does not work when I build the Test Manager as an EXE application. There are no errors generated, but the new VI is not launched and I think that one of the functions in the sequence never returns. I am not sure if the New VI is created or not.
    Does anyone know how to modify this so that New VIs can be created, uniquely named and launched, that will work properly no matter whether the creating VI is running in either development (for debugging) or as a built application? You can query if it is running as an application or as development. 
    Does the sequence New VI function, VI.FP.Open and VI.Run VI work when used in a Built application? Is there some other method that will work to serve this need?  Yes they should
    Is there a function in LabView that will launch an exe file like WinExec does? Perhaps I can use that. Building an executable should be fine.  It's most likely something silly and you'll end up saying D'Oh! 

  • I have loaded Lion on my MacBook and the new trackpad functions work only on one ordinary account or user and not on the admin account. The trackpad preferences are well set. What can I do?

    I have loaded Lion on my MacBook and the new trackpad functions work only on one ordinary account or user and not on the admin account. The trackpad preferences are well set. What can I do?

    iCloud should still help you reduce some hard drive space. Just select "optimize" in the icloud tab in Mac Photo App preferences.
    Granted, not the same as completely offloading your library to a back-up drive at your location.
    Good Luck!

  • What are the differences between ECC5.0 and 6.0 new GL functionality

    Hi Experts,
    What are the differences between ECC5.0 and 6.0 new GL functionality.
    If we want to implement IFRS, I think New GL functionality is very helpful, but why sap is recommending only for ECC6.0 new GL functionality, Eventhough this functionality is available in ECC5.0.
    Best Regards,
    Dharani

    Dear,
    ECC 5.0 vs. ECC 6.0/SAP ERP 6.0
    Functionality not available in the new G/L with mySAP ERP 2004 and ERP Central Component (ECC) 5.0:
    Transfer prices
    Statistical key figures
    Euro translation
    Audit Information System (AIS)
    Archiving
    Data retention tool
    Regards,
    Chintan Joshi.

  • Creation of new partner function for VENDOR

    Hi,
    I've a requirement to create some Partner functions for vendors while creation of vendor. Some Partner functions are available by default and some we need to add. but while doing a BDC we are not able to find how many of them are available or where to put the new Partner function?
    Please let me know, if there is any BAPI availble..
    Regards,
    Anupam

    Try below LSMW batch input method its very esay to upload data
    Object               0040   Vendor master
    Method               0001   Standard
    Program Name         RFBIKR00
    Program Type         B   Batch Input

  • Got to end of trial period for Adobe reader XI and cannot revert back to old version or install another version b/c it says I have a newer more functional version, so now I've got no reader at all and cannot fix. Any ideas how to overcome this?.

    Got to end of trial period for Adobe reader XI and cannot revert back to old version or install another version b/c it says I have a newer more functional version, so now I've got no reader at all and cannot fix. Any ideas how to overcome this?.

    YOu need to be clear about the products you are using, so we can help you. In particular there is no trial of Adobe Reader, it is free and keeps running. Sounds like you are using some versions of Acrobat - which?
    YOu must properly uninstall the trial, don't just delete files or you may get a mess impossible to recover.

  • New Node functions in PI 7

    Hi All,
    Can anybody tell me what are the new node function(s) added in PI 7 compare to XI 3? Apart from node fucntions what are the new functions available in PI 7?
    Regards
    Faisal

    Refer PI 7.1 Blogs:
    /people/peter.gutsche/blog/2008/10/27/what146s-new-in-sap-netweaver-pi-71
    SAP NetWeaver Process Integration 7.1 - Details [original link is broken]
    New in SAP PI 7.1
    Mapping enhancements:
    http://help.sap.com/saphelp_nwpi71/helpdata/en/44/a7b4355d867455e10000000a11466f/frameset.htm
    1.     Graphical variables:
    /people/william.li/blog/2008/02/13/sap-pi-71-mapping-enhancements-series-using-graphical-variable
    2.     Function library: In lower releases, you were able to save and manage user-defined functions as part of one message mapping only. You can now create  function libraries independently of specific message mappings, and can use the functions you define in them in multiple message mappings.
    http://wiki.sdn.sap.com/wiki/display/XI/PI7.1ConceptofFunctionLibraryinProcessIntegration
    http://help.sap.com/saphelp_nwpi71/helpdata/en/43/78bd467afa345ae10000000a422035/frameset.htm 
    3.  Correcting Structural Inconsistencies
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417400)ID1636393650DB10213226047035219960End?blog=/pub/wlg/8662
    http://help.sap.com/saphelp_nwpi71/helpdata/en/07/0c13f257f94c6089894b62f3568b9d/frameset.htm
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417400)ID1636393650DB10213226047035219960End?blog=/pub/wlg/8282

  • "Open in New Window" function in the page toolbar

    Hi,
    I am new to portal development and I have what looks like as an easy Iview modification:
    I need to implement the "open in new window" Function as a link, directly in the page toolbar (next to History, Back, Forward...) and not as an Option in the menu.
    This should be done in the Pagetoolbar and not the light pageToolbar.
    I downloaded the PAR file "com.sap.portal.navigation.pagetoolbar" but I don't how what I should change.
    Can someone please help me?
    Many thanks and points in advance.
    Regards

    Hi Stephane,
    Are you using the default framework page in your desktop. <b>Use the light framework page. It has the "Open in new window" as a link in the page tool bar.</b>
    If you still wish to stick to the default framework page; firstly you may want to remove the existing "open in new window" from the menu. Then you may need to copy the same code from the light fw toolbar par file for that 1 single link and paste it in your default fw toolbar. I can tell you the exact code tomorrow.
    Hope the first option may be desirable to you.

  • A new partner function is been defined for a particular customer in r/3?

    Hi All,
    There is a new partner functions been defined for a customer apart from soldto,shipto,payer,billtoparty partner functions.
    The new partner functions is Sales head.
    And how to i bring the sales head information from the customer master from r/3 to bw?
    Do i need to create a new zobject nor enhance the customer master ? nor simply create an sales head object in bw and define the characteristics as Reference characteristics??
    pls help me !!
    Thanks
    Pooja

    Hi,
    You should enhance the standard Data source 0customer_attr with that additional partner function (sales head) as per the proper logic and replicate the same . if it is 3.5 that same object( related to that field length and data type) same object can be added as attribute at info object level and do the transfer rules   and activate that and try to the load.
    Thanks & Regards,
    Sathish

  • Using new DJ function in iTunes with Apple TV

    Ideally, wouldn't it be great to be able to stream the new DJ function in iTunes to an Apple TV which is wired into my home stereo systems? Then I would be able to control an entire house from my kitchen iMac. Now THAT would be a party! I am successfully streaming the library, but DJ doesn't show up in the playlists. Am I missing something?
    Thanks for any help.
    Carol

    appletv shows up as "speakers" in itunes, you would just make your itunes DJ output direct to the appletv via airtunes.
    this will do exactly what you want.

Maybe you are looking for