Using Deciles

Post Author: ivanl
CA Forum: Crystal Reports
Hello,
I am using the standard version of Crystal Reports Xi. 
In my report, I have customers each with a total asset amount (to get this amount I summed the individual assets for each customer to get to total asset for each customer).
1) I would like to decile the results according to the asset amount (i.e. top decile has are the 10% of customers who have the most assets).
Then I want to use thes same deciles of customers to look at other information, e.g. the average age of the deciles...
Thanks,
Ivan

Thank you for replying Bennet-Alder. I just unplugged and replugged the USB cable from the adapter in the back of the MacPro to see if that would help and now the Options section of the Display System Preferences completely disappeared. Next I did the same, but swapped with another USB that was plugged in and all is working. It seems the USB ports are finicky. I'm using all of the ports, and one is to a USB hub, is it possible that having too many USB devices plugged in can cause this problem?

Similar Messages

  • Use percentage function in pl sql

    Hi,
    I want to get the employees that their salary are in top 13% of salaries.
    I learned in this forum that I can get the 10% of top salaries in HR schema by this query:
    WITH     got_tenth     AS
         SELECT     last_name, salary
         ,     NTILE (10) OVER (ORDER BY salary)     AS tenth
         FROM     hr.employees
    SELECT       last_name, salary
    FROM       got_tenth
    WHERE       tenth     = 10
    ORDER BY  salary     DESC
    ;Output:
    LAST_NAME                     SALARY
    King                           24000
    Kochhar                        17000
    De Haan                        17000
    Russell                        14000
    Partners                       13500
    Hartstein                      13000
    Greenberg                      12000
    Errazuriz                      12000
    Higgins                        12000
    Ozer                           11500There is no "TOP" keyword in Oracle.I wondered, What if I want to get, for example, the employees who are in the top 12% of the salaries? here we cannot use deciles (maybe we can but it won't be very nice).
    Thanks a lot to helpers

    CUME_DIST can help:
    http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions035.htm
    WITH  tbl  AS
      SELECT  last_name, salary
      ,  cume_dist() OVER (ORDER BY salary DESC)  AS cumulative_pcnt
      FROM  hr.employees
    SELECT *
    FROM tbl
    WHERE cumulative_pcnt <=0.12;Tie values always evaluate to the same cumulative distribution value, so if you need exact 12% of the rows you can add employee_id in the ORDER BY list.
    Edited by: 1006646 on 19.05.2013 10:14

  • Select top 10 percentage

    Hi,
    I want to get the top 10% of salaries in employees table. But I got error:
    SQL> select top 10 percent salary
      2  from employees
      3  order by salary desc;
    ORA-00923: FROM keyword not found where expectedHow can I get the top 10% percent?
    Thanks a lot

    Hi,
    998093 wrote:
    ... What if I want to get, for example, the employees who are in the top 12% of the salaries? here we cannot use deciles (maybe we can but it won't be very nice).Actually, you can. How nice it will be depends on your data and your exact requirements.
    Earlier, we said that the top 10% was the 10th of 10 buckets.
    We could say that the top 12% is the last 12 of 100 buckets:
    WITH     got_tenth     AS
         SELECT     last_name, salary
         ,     NTILE (100) OVER (ORDER BY salary)     AS hundredth
         FROM     hr.employees
    SELECT       last_name, salary
    FROM       got_tenth
    WHERE       hundredth     > 100 - 12
    ORDER BY  salary     DESC
    ;I won't clutter up this message by showing the results for every query; I'll just report the total number of rows. The query I posted earlier (for the top 10%) produced 10 rows of output; the query immediately above produces 12. That's starting to bother me. There are 107 rows in hr.employees. (They all have a salary; don't forget to deal with NULLs in general.) The top 10% should contain 107 * .1 = 10.7 rows. Of course, this has to be rounded to an integer, so it would have been a little better if the top 10% showed 11 rows (since 11 is closer to 10.7 than 10 is), but it's not a real big problem. Likewise, the top 12% should have 107 * .12 = 12.84 rows, so 13 rows of output might be better, but 12 rows isn't too bad.
    Now say we want to simplify the condition "WHERE     hundredth     > 100 - 12". Instead of taking the last 12 buckets in ascending order, let's take the first 12 buckets in descending order:
    WITH     got_tenth     AS
         SELECT     last_name, salary
         ,     NTILE (100) OVER (ORDER BY salary DESC)     AS hundredth
         FROM     hr.employees
    SELECT       last_name, salary
    FROM       got_tenth
    WHERE       hundredth     <= 12
    ORDER BY  salary     DESC
    ;The result set now contains 19 rows! Why? Because NTILE puts extra items (when there are extras) in the lower-numbered buckets. When there were 10 buckets, then buckets 1 trough 7 had 11 items each, and buckets 8 through 10 had 10 items. We were only dispolaying bucket #10, so we only saw 10 items. Now that there are 100 buckets, buckets 1 through 7 will have 2 items each, and buckets 8 through 100 will have 1 item each. When we numbered the buckets in ascending order, and took the last 12 buckets, we wound up with 12 * 1 = 12 rows, but when we numbered the buckets in descending order and took the first 12 buckets, we got (7 * 2) + (5 * 1) = 19 rows.
    When you have R rows and B buckets, and R/B doesn't happen to be an integer, then NTILE will distribute the rows as equally as possible, but some rows will have 1 item more than others. When the ratio R/B is high, that might not be very significant, but when R/B gets close to 1, then you have situations like the one above, where the bigger buckets, although they have only 1 more item than the smaller buckets, are twice as big. Even worse is the situation where R/B is less than 1; then the last buckets will have 0 items.
    So, as you noticed, NTILE isn't a good solution for all occasions. Here's a more accurate way, using the analytic ROW_NUMBER and COUNT functions:
    WITH     got_analytics     AS
         SELECT     last_name, salary
         ,     ROW_NUMBER () OVER (ORDER BY  salary  DESC)     AS r_num
         ,     COUNT (*)     OVER ()                                AS n_rows
         FROM     hr.employees
    SELECT       last_name, salary
    FROM       got_analytics
    WHERE       r_num / n_rows <= 12 / 100
    ORDER BY  salary     DESC
    ;This produces 12 rows.
    If you want 13 rows (because 107 * .12 = 12.84 is closer to 13), then you can change the main WHERE clause like this:
    WITH     got_analytics     AS
         SELECT     last_name, salary
         ,     ROW_NUMBER () OVER (ORDER BY  salary  DESC)     AS r_num
         ,     COUNT (*)     OVER ()                                AS n_rows
         FROM     hr.employees
    SELECT       last_name, salary
    FROM       got_analytics
    WHERE       r_num     <= ROUND (n_rows * 12 / 100)
    ORDER BY  salary     DESC
    ;

  • Using RETURNING clause with Execute Immediate

    I wrote a query to update a table and return the column in to a nested table type variable using returning clause but its not working I am getting error like
    ORA-06550: line 66, column 22:
    PLS-00306: wrong number or types of arguments in call to '||'
    ORA-06550: line 66, column 4:
    PL/SQL: Statement ignored
    I am getting error in following part of my query
    || 'RETURNING if_row_status bulk collect INTO '
    || v_if_row_status;
    v_if_row_status is defined as -
    TYPE v_count IS TABLE OF varchar2(50) INDEX BY BINARY_INTEGER;
    v_if_row_status v_count;

    I am trying to update a table for diffrent column if they are null and want no of column updated for each column.
    I wrote following query but I am not getting the correct output.
    UPDATE
    Temp_Bulk_Col_POC
    SET if_row_status = 'VALIDATED',
    if_row_processed_date = sysdate,
    if_row_error_msg =
    CASE
    WHEN record_type IS NULL
    THEN 'RECORD_TYPE is a required column and cannot be NULL'
    WHEN source_system IS NULL
    THEN 'SOURCE_SYSTEM is a required column and cannot be NULL'
    WHEN record_company IS NULL
    THEN 'RECORD_COMPANY is a required column and cannot be NULL'
    WHEN record_system IS NULL
    THEN 'RECORD_SYSTEM is a required column and cannot be NULL'
    WHEN txn_flag IS NULL
    THEN 'TXN_FLAG is a required column and cannot be NULL'
    WHEN create_date IS NULL
    THEN 'CREATE_DATE is a required column and cannot be NULL'
    WHEN UPDATE_date IS NULL
    THEN 'UPDATE_DATE is a required column and cannot be NULL'
    WHEN source_customer_id IS NULL
    THEN 'SOURCE_CUSTOMER_ID is a required column and cannot be NULL'
    WHEN source_product_id IS NULL
    THEN 'SOURCE_PRODUCT_ID is a required column and cannot be NULL'
    WHEN az_product_id IS NULL
    THEN 'AZ_PRODUCT_ID is a required column and cannot be NULL'
    WHEN decile IS NULL
    THEN 'DECILE is a required column and cannot be NULL'
    END
    WHERE if_row_status IS NULL
    AND (record_type IS NULL
    OR source_system IS NULL
    OR record_company IS NULL
    OR record_system IS NULL
    OR txn_flag IS NULL
    OR create_date IS NULL
    OR UPDATE_date IS NULL
    OR source_customer_id IS NULL
    OR source_product_id IS NULL
    OR az_product_id IS NULL
    OR decile IS NULL)
    RETURNING if_row_status,record_type,source_system,record_company,record_system,
    txn_flag,create_date,UPDATE_date,source_customer_id,source_product_id,az_product_id,
    decile
    BULK COLLECT INTO
    v_if_row_status,v_record_type,v_source_system,
    v_record_company,v_record_system,v_txn_flag,v_create_date,v_UPDATE_date,
    v_source_customer_id,v_source_product_id,v_az_product_id,v_decile;
    its showing same number for all the column.
    how I can collect based on the coulmn updated

  • How do I use Edge Web Fonts with Muse?

    How do I use Edge Web Fonts with Muse - is it an update to load, a stand alone, how does it interface with Muse? I've updated to CC but have no info on this.

    Hello,
    Is there a reason why you want to use Edge Web Fonts with Adobe Muse?
    Assuming you wish to improve typography of your web pages, you should know that Muse is fully integrated with Typekit. This allows you to access and apply over 500 web fonts from within Muse. Here's how you do it:
    Select a text component within Muse, and click the Text drop-down.
    Select Add Web Fonts option, to pop-open the Add Web Fonts dialog.
    Browse and apply fonts per your design needs.
    Muse also allows you to create paragraph styles that you can save and apply to chunks of text, a la InDesign. Watch this video for more information: http://tv.adobe.com/watch/muse-feature-tour/using-typekit-with-adobe-muse/
    Also take a look at these help files to see if they help you:
    http://helpx.adobe.com/muse/tutorials/typography-muse-part-1.html
    http://helpx.adobe.com/muse/tutorials/typography-muse-part-2.html
    http://helpx.adobe.com/muse/tutorials/typography-muse-part-3.html
    Hope this helps!
    Regards,
    Suhas Yogin

  • How can multiple family members use one account?

    My children have iphones, ipads, ipods and mac books, my problem is how do you use home sharing with the devices and not get each others data.  My Husband just added his iphone to the account and got all of my daughters contacts.  I understand they could have there own accounts but if i buy music on itunes and both children want the same song, I don't feel i should have to pay for it twice.  Is there away we can have home sharing on the devices and they can pick and choose what they want? and is this icloud going to make it harder to keep their devices seperate?

    My children have iphones, ipads, ipods and mac books, my problem is how do you use home sharing with the devices and not get each others data.  My Husband just added his iphone to the account and got all of my daughters contacts.  I understand they could have there own accounts but if i buy music on itunes and both children want the same song, I don't feel i should have to pay for it twice.  Is there away we can have home sharing on the devices and they can pick and choose what they want? and is this icloud going to make it harder to keep their devices seperate?

  • Iphoto crashing after using mini-dvi to video adapter

    Hi, IPhoto on my Macbook is crashing. I can open it, then as soon as I scroll down it locks up and I have to force quit.
    This started happening right after I used a Mini-DVI to Video Adapter cable to hook my macbook up to my TV. The adapter/s-video connection worked and I was able to see the video on the tv. But iphoto immediately locked up the computer when I went to slide show and now it locks every time I open it.
    Any ideas?
    Thank you:)
    Dorothy

    It means that the issue resides in your existing Library.
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    Regards
    TD

  • How do multiple family members use iTunes.? One account or multiple?

    How do multiple family members use iTunes. One account right now but apps gets added to all devices and iTunes messages go to all devices.  Can multiple accounts be setup and still have ability to share purchased items?

    Hey Ajtt!
    I have an article for you that can help inform you about using Apple IDs in a variety of ways:
    Using your Apple ID for Apple services
    http://support.apple.com/kb/ht4895
    Using one Apple ID for iCloud and a different Apple ID for Store Purchases
    You can use different Apple IDs for iCloud and Store purchases and still get all of the benefits of iCloud. Just follow these steps:
    iPhone, iPad, or iPod touch:
    When you first set up your device with iOS 5 or later, enter the Apple ID you want to use with iCloud. If you skipped the setup assistant, sign in to Settings > iCloud and enter the Apple ID you’d like to use with iCloud.
    In Settings > iTunes and App Stores, sign in with the Apple ID you want to use for Store purchases (including iTunes in the Cloud and iTunes Match). You may need to sign out first to change the Apple ID.
    Mac:
    Enter the Apple ID you want to use for iCloud in Apple () menu > System Preferences > iCloud.
    Enter the Apple ID you want to use for Store purchases (including iTunes in the Cloud and iTunes Match) in Store > Sign In. In iTunes 11, you can also click iTunes Store > Quick Links: Account.
    PC (Windows 8):
    Enter the Apple ID you want to use for iCloud in the Control Panel. To access the iCloud Control Panel, move the pointer to the upper-right corner of the screen to show the Charms bar, click the Search charm, and then click the iCloud Control Panel on the left.
    Enter the Apple ID you want to use for Store purchases (including iTunes in the Cloud and iTunes Match) in iTunes. In iTunes 10, select Store > Sign In. In iTunes 11, click iTunes Store > Quick Links: Account.
    PC (Windows 7 and Vista):
    Enter the Apple ID you want to use for iCloud in Control Panel > Network and Internet > iCloud.
    Enter the Apple ID you want to use for Store purchases (including iTunes in the Cloud and iTunes Match) in iTunes 10 in Store > Sign In. In iTunes 11, click iTunes Store > Quick Links: Account.
    Note: Once a device or computer is associated with your Apple ID for your iTunes Store account, you cannot associate that device or computer with another Apple ID for 90 days. Learn more about associating a device or computer to your Apple ID.
    Thanks for using the Apple Support Communities!
    Cheers,
    Braden

  • Using SQVI to generate report of open and released delivery schedule lines

    All,
    I'm using SQVI  to generate an excel spreadsheet for some buyers to show open released schedule lines because they are a 1 line item per scheduling agreement company.
    I used the logical database MEPOLDB instead of a table joint and pulled fields from EKKO(vendor, SA #,&purchasing group), EKPO(Material Number), EKEH(schedule line type), and EKET(delivery date, scheduled qty,previous qty).
    Does this sound like I'll get the results I want on paper as long as I use the right selection criteria, because the report I'm getting isn't quite what I expect? I am unable to identify which lines are authorized to ship vs. trade-off zone, planning, etc. in the report thus far.

    Hi Mark,
                 I have faced same requirement. I am not sure about transporting to TST and PROD. I done by this way.
    After generating SQVI program in DEV , I assigned that program  to a transaction and tested in DEV. Later i have regenarated SQVI in Production. then I assigned the generated Program to same transaction in DEV. And transported the Tcode assignment of program to Production..
    About authorization , if its not sensitive report, BASIS can restrict at transaction level.
    Regards,
    Ravi.

  • Using Mini DVI to VGA adapter on MacBook

    I bought the adapter from Apple & hooked up my LCD monitor to the MacBook, but the video I get on the monitor is different that on my laptop. It has an old screen background & the dock but nothing on my desktop shows up. Also, when I'm plugged to the monitor, my dock disappears on the laptop screen. Is there some setting I need to change? It worked fine with my G4 PowerBook.
    Thanks for any help....
    MacBook   Mac OS X (10.4.6)  

    i use the mini dvi-vga adapter in my classroom almost everyday. It sounds like your new monitor is running as a side by side monitor to your display instead of a "replacement" display.
    To get your projector/monitor to basically show whatever is on your macbook screen once you've hooked up press F7....this should make your projector/monitory become your display with your dock & all of your desktop stuff. Your new monitor will completely mirror your display.
    THis should do what you're looking for.

  • Using mini-DVI to VGA adapter to Samsung display

    I have 2009 late model of mac mini, The text on display looks washed out, not clear or sharp at all from day one, I thought it was the old model of monitor, tried the same cable to another monitor on another computer, SAME. so I thought the problem could be the cable or adapter.
    It's hard for me to believe is the signal from computer. I'm using VGA adapter made by Dynex bought from Best Buy.
    Anybody has suggestions?? Thanks

    Yeah, My old Samsung is lcd synmaster 17", bought many years ago at around $1000. Crazy, crazy price looked back. It's fine when I used it on the retired old Dell. It must be the adapter, trying not to buy another VGA adapter, could not image my next lcd will use one, anyway.
    This cable has only 14 pins vs 15 pins on the other cable, not sure if it matters?? Or if Safari has anything to do with it??
    Thank for you reply...

  • Using S-Video w/ the Mini DVI to Video Adapter

    I just purchased a MacBook last week and I also purchased a Mini DVI to Video adapter for it so I can use the built-in DVD player to watch movies on my TV. I have a composite to composite cable and that worked fine when I connected the cable between the Mini DVI to Video Adapter and my TV. However, when I tried to use a S-Video cable and connected that between the Mini DVI to Video Adapter and my TV; then I got no picture at all. All I saw on the TV was a picture of the MAC desktop w/o the dock and the movie or nothing else played at all.
    Is the composite connection a better connection for the MAC, or, are there some settings I need to work with on the MAC to get the S-Video connection to work?

    I managed to figure this one out, by fluke. The MacBook has to be powered on and ready for user input prior to connecting the mini DVI to video adapter with the s video already connected to it, and to the TV. Once I did it this way, it worked fine. I just thought I'd share this.

  • Using a mini-DVI to video adapter

    I have connected the video adapter and everything works fine. I use the internet for my video source and I was just wondering, is it possible to have video playing fullscreen on the tv and have another window open on my desktop that I can work with without disrupting the video from the browser? Every time I watch something I am unable to work on my computer while the video is playing.

    As far as I know, you can't go full screen on one monitor without it interfering with the other. I believe this would require a second video card, which isn't possible for a MacBook.
    ~Lyssa

  • Display problems using mini-dvi to video adapter

    I recently purchased the mini-dvi to video adapter for my powerbook to use my TV as a monitor and to play pictures and videos from the laptop to the TV. I am getting a full color display on the TV, but it's only the screen saver. None of my files, text, or any other desktop folders or menus appear when I open them up on the laptop. The only screen that opens is the display preferences when I open that up, but it's a different set of preferences than what's in my computer's display preferences, as it's header is "NTSC/PAL". But other than that 1 menu, nothing is appearing but the screen saver.

    OK, I discovered that I didn't know what I was doing. With the Mini-DVI to video adapter, you need to use an S-Video cable that plugs into an S-video jack on the TV, and then you need a separate cable to plug into the audio out jack on the MacBook to plug into the TV.
    I think you could also use an S-video to RCA component cable if you have a TV with component video input, but I couldn't get that to work so I went to the s-video to s-video cable.

  • Resolution using Mini-DVI to Video Adapter

    I have a Mini-DVI to Video Adapter that I connect to a television set. When I connect it my resolution drops from 1280x800 on my MacBook to 1024x768 on the television. On the MacBook tech specs screen it says: "Simultaneously supports full native resolution on the built-in display and up to 1920 by 1200 pixels on an external display, both at millions of colours".
    Is it just something that I'll have to live with when switching to the television, or is there any way that I can increase this resolution?

    You can make the TV the main monitor by dragging the menu bar to it in the "Arrangement" pane of "Displays" System Preference, or if you connect the power adapter and an external mouse and keyboard, just close the lid. It will sleep, but will wake when you use the mouse or keyboard.

Maybe you are looking for