Displaying "Top N and Other" in Pie Chart

Hello All,
As the subject implies, we are trying to display in pie charr top 5 products by sales and bucket rest of the product sales in "Others". Oracle provided documentation gives below code. But I am not sure as how we can package this in view which can be used in chart
RETURN "Top5Companies" AS SELECT
"coName" AS "companyName",
SUM("txnID") AS "numTxn"
GROUP BY "coName"
ORDER BY "numTxn" DESC
PAGE(0,5)
RETURN "Others" AS SELECT
'Others' AS "companyName",
SUM("txnID") AS "numTxn"
WHERE NOT ["coName"] IN "Top5Companies"
GROUP
Edited by: 948378 on Sep 5, 2012 9:46 AM

Hi, 
For your first question, Other should show up if you have more than 10 groups generated.  Looking at the Group Tree, how many groups show up? 
What happens if you did a Top5 instead of 10?  Does Other show in the Group Tree? 
For your second question, Crystal will group on unique values regardless if the group is on a field or formula.  I have a sneaking suspicion there is either a leading or trailing space in the name.  Use the Trim function to remove the white spaces like: 
IF (IsNull({Command.AcctPriKey}) or length(ToText({Command.AcctPriKey}))<1)
then Trim ({Command.custname})
else Trim ({NAcct_.Nacct});
For your third question, throw the iif format out.  That was introduced because of dBase years ago and most people I know hate using it.  Go with the traditional.  Easier to read and figure out. 
Good luck,
Brian

Similar Messages

  • How to show top 20 values in a Pie Chart

    Hi
    We have a requirement to develop a Pie chart for top 20 Order value locations.but i am not able to plug in top 20 logic in a pie chart.This functionality (TOP N) is avilable in bar chart , but it is not avilable in Pie chart. Could some help me to implement this logic in a Pie chart.
    Your help in this regard is highly appreciated.
    Thanks
    Laj

    Not sure what you are saying here.  Obviously you have to have a place to place the distinct values, whether in another column or in the same column. That's not really a drawback, just a fact of life.
    I'm curious about what you mean by "multiple columns to dynamically select some records with specific criteria from different columns."  If you can give a specific example of what you are trying to do, I there may be a solution.  Are you trying to do something like Excel's filtering on multiple columns?
    If you are you can click the disclosure triangle by the column letter to get a dropdown like this:
    Similar to Excel.
    SG

  • Top N and Other

    I grouped a report and selected top 10 and other.  Instead of showing the word other for the other category (despite choosing the radio button to do so) it shows the last value in the group.  I think its' because I am grouping on a calculated field:
    IF (IsNull({Command.AcctPriKey}) or length(ToText({Command.AcctPriKey}))<1)
    then {Command.custname}
    else {NAcct_.Nacct}
    also
    When I group on this, it doesn't actually group on this value, it groups on the combined fields in this formula.  So the result of this field could be Kobe because NAcct_.Nacct = Kobe or because Command.custname = Kobe.  Crystal WILL differentiate and will put them in different groups.  How do I prevent that?
    also
    iif(IsNull({Command.AcctPriKey}) or length(ToText({Command.AcctPriKey}))<1), {Command.custname}, {NAcct_.Nacct})
    Doesn't work.  I don' t know why.
    Finally isn't there something like coalesce in crystal.  It's such a handy function, they should really consider supporting it so we don't have any of these issues.

    Hi, 
    For your first question, Other should show up if you have more than 10 groups generated.  Looking at the Group Tree, how many groups show up? 
    What happens if you did a Top5 instead of 10?  Does Other show in the Group Tree? 
    For your second question, Crystal will group on unique values regardless if the group is on a field or formula.  I have a sneaking suspicion there is either a leading or trailing space in the name.  Use the Trim function to remove the white spaces like: 
    IF (IsNull({Command.AcctPriKey}) or length(ToText({Command.AcctPriKey}))<1)
    then Trim ({Command.custname})
    else Trim ({NAcct_.Nacct});
    For your third question, throw the iif format out.  That was introduced because of dBase years ago and most people I know hate using it.  Go with the traditional.  Easier to read and figure out. 
    Good luck,
    Brian

  • I have an airport extreme 2013.  Why does my airport utility sometimes display IP addresses and other times the names of the devices?  I want it to always display the device names.

    I have an airport extreme 2013. Why does my airport utility sometimes display IP addresses and other times the names of the devices? I want it to always display the device names.

    The utility has had less and less useful information .. it might be time to simply find a different utility.
    Fing network scanner. iphone and ipad.
    https://itunes.apple.com/au/app/fing-network-scanner/id430921107?mt=8
    This is very popular.. I do not know of what works well on Mac OS because i have installed 5.6 utility which of course has far more info than the later toy version. Plus using an Asus router which has excellent listing of all the clients.
    Sometimes beating yourself up to make apple routers do what you want is easier solved with lateral thinking.

  • Charts - Display Top Percent and Legend Layout Questions

    I have two pie charts with problems. In one, I've set the Options Legend Layout to Both, Top Percent to 85, and the legend displays the top 85 percent with a count for each group, but the total of the count column is still the grand total, not the total of the 85 percent.
    In the second pie chart, I have the same settings, Top Percentage and Options Legend Layout Both, but the count displays as dollar values, eventhough the field is a date field.
    Does anyone know how to correct these problems?
    Thanks!
    Robin

    hi Robin,
    you've got 2 options:
    a) you can use the cross-tab method that i mentioned before...a top N in the cross tab will show a percentage that is based on the whole record set as opposed to the N values...this is different than the chart legend percentage
    b) if you are willing to show the percentage that is based on the whole record set in the chart labels instead, you can  do the following...
    if you have an On Change Of value of "country" and the summary is "sales", then create a new formula called "chart title" that has syntax similar to
    {Customer.Country} +  chr(10) + totext(PercentOfSum ({Customer.Last Year's Sales}, {Customer.Country}))
    now change the chart On Change Of to your new formula. the percentage based on the whole record set will be shown in the chart labels.
    cheers,
    jamie
    Edited by: Jamie Wiseman on Nov 25, 2009 1:34 PM
    Edited by: Jamie Wiseman on Nov 25, 2009 1:35 PM

  • Display the value as percentage in pie-chart in WEBI

    Hi Experts,
       I have two measures  No. of Sales Transactions and Customer Visit. And I created a measure named CustomerConversionRate.
    ie, CustomerConversionRate = ([No. of Sales Transactions]/[Customer Visit])*100.
    So my requirement is that CustomerConversionRate is  to be display  into a pie chart in WEBI . CustomerConversionRate always a percentage.I
    hereby attached a sample pie-chart based on my requirement.
    Eg:CustomerConversionRate=79.27 and Remaining = 20.73
    I want to display  CustomerConversionRate=79.27  and Remaining = 20.73 into a pie chart in WEBI

    Hi ,
    Add 1 more Query with dimension that will have values
    Completed      Or      X
    Remaining      Or      Y
    Duplicate your Query And Keep only 1 Dimension [Extra_Dim]( Remember this Dim Name you have to use it in different way so it would be better if use any Dimension which is not there in First Query )
    Go To--> View Script --> Custom SQL
    write below code in Query Script Editor
    SELECT
      'Completed' As "CATEGORY"
    FROM
      "YOUR_TABLE"  Table__1
    Union
    SELECT
      'Remaining' As "CATEGORY"
    FROM
      "YOUR_TABLE"  Table__2
    And Save this Query .
    Now Rename this Query as Pie Dimension .
    Now You can Use [Extra_Dim] As [Achievment_Status]
    Create Measure Variable [Achievment_Val] as mention above .
    And use it

  • How to present percent and value in pie chart?

    Hi guys,
    I tried to present both percent and value in a pie chart in web intelligence. I've looked over data value setting but still no luck. Can we request this feature to be available in the next SAP BO platform upgrade.
    Thanks.

    Hi,
    You can try this .
    1)
    Add 2 Pie charts in your Report (Align top
    & Left Same Size ) .
    Set Background Color Transparency 0%
    Set Data Value Presentation value for 1 st (Outside)
    Percent for 2nd (Inside)
    Make size of the pie as per the value presentation  .

  • Need to put value and test in pie chart

    hi all,
    I have a requirement where i have to put both the value and the text in the pie chart.
    I have useed the following code
    <SliceLabel textType="LD_VALUE"/>
    is it possible to display both value and text.
    Regards,
    Dhaya.

    To get the actual Value use this.
    <SliceLabel textType="LD_VALUE"/>
    Other vaules you can use are
    LD_TEXT_PERCENT, LD_VALUE , LD_TEXT , LD_PERCENT
    Only these are possible in oracle library
    http://winrichman.blogspot.com/search/label/chart

  • Report Top 10 and OTHERS

    Hi,
    I would like to report the TOP 3 and othres as table and chart on the web report.
    I am very glad if you advice how to do.
    Transaction
    customer1 5000
    customer2 6000
    customer3 3000
    customer4 2000
    Customer5 8000
    the requirement
    customer5 8000
    customer2 6000
    customer1 5000
    OTHERS    5000
    I think virtual characteristic is considerble. But I have no experience about Virtual Characteristic. Or does anyone have other good way?
    Kind regards,
    Masaaki

    Hi Aleksi,
    Thanks for your advice.
    Accroding to your advice, I have tried. By now I cannot create the elements of the structure in which TOP N caracter values are filtered.
    For filtering, I think variable with replecement path can be used. In this case, another query is required in which TOP N are calculated.
    But this variable cannot be used in the element of the structure.
    it is great if you advice how to create the ristricted characteristic with TOP N.
    Kind regards,
    Masaaki

  • Why some PDF docs displayed are garbled and others are not?

    I've had this love hate relationship with adobe for the past few days.  I'm so frustrated since I can't seem to figure why other pdf docs display information correctly while others are garbled. It looks as if the letters/text overlap.  I 'm loosing sleep over this.  I'm at my wits end. Can someone please help? I appreciate any assistance you can provide.
    Thanks,
    C

    Hi Allegria11,
    Don't lose sleep over Adobe! Let's see what we can figure out. But I have lots of questions to get us started:
    Are you creating the PDFs yourself, or viewing PDFs from different sources?
    What are you using to view the PDFs (Reader, Acrobat, and what versions)?
    Do these PDFs all use the same fonts, or different ones?
    Do you know whether the fonts are embedded/subsetted in the PDFs? (You can check by choosing File > Properties and clicking the Fonts tab.
    Let's start there, and we will dig deeper if none of these shed any light on the problem.
    Best,
    Sara

  • Powerbook 17" display issues: posterization and other psychedelia

    Hello,
    My Powerbook 17" has, since it's purchase in June 2005, a problem with the display that occurs periodically whereby the display suddenly posterizes and becomes extremely hard to read. I have found that adjusting the display angle, that is, moving the Powerbook display hinge can make it worse or can cause it to revert to normal. It seems to me that there is a short in or interference with the wiring that must pass through this junction. Has anyone else had a similar experience with their Powerbook 17"?

    Your PowerBook is the same generation as the one most people are complaining about, although the majority of affected users that have been reporting the problem have machines that were manufactured around the end of the first quarter of 2005 at the factory described as W8 in Shanghi. There are ways to find out if yours is one of these machines by doing some web searching. Stating site names here my go against Apple's usage policies for this discussion board ... sorry, but info is easy to find with a little searching.
    I am glad to hear that you have not as yet experienced the dreaded lines or blanked-out areas. It is still a good idea to call Apple Care and get a case number if you have not already. Explain your problem and they may be able to help. Even if there is nothing they can do, your problem will be registered. This case number may come in handy if heaven forbid your machine starts developing more severe screen problems. Good luck!

  • Why do some email accounts show in top section and others do not?

    Under Mailboxes, on the left side, in the top section I see 4 accounts I can click on, however, in the lower section under accounts, I have five accounts. For some reason, one of my gmail accounts does not display in the top section. Why is this?
    Thanks.

    To add it back, tap the Edit button at the top of the list of mailboxes and select the missing email account so that it has a tick against it (you can also change their order in the list by dragging the parallel line icon to an account's right), tapping Done should then get it to show in the list

  • Top 5 and Other

    Does anyone know how to show the top 5 totals and group everything else into an "Other" category?
    select store_name, sum(total_sales)
    from sales_fact;
    Store A 600
    Store B 500
    Store C 400
    Store D 300
    Store E 200
    OTHER 100
    I am trying to avoid having to run two separate reports in discoverer.
    Thanks in advance.

    I created a little test table with some data:select * from sales_fact order by store_name;
    STORE_NAME TOTAL_SALES
    Store A            600
    Store A            600
    Store B            100
    Store B            100
    Store C            300
    Store Q             30
    Store Q             30
    Store Q             30
    Store R             10
    Store S             10
    Store W             10
    Store X             60
    Store X             60
    Store Y             10
    Store Z              5And then created the following selectselect store_name, sum(S) SUM2 from
      (select
        decode(sign(R-6),-1,STORE_NAME, 'OTHER' ) STORE_NAME,
        decode(sign(R-6),-1, R,          6      ) R2,
        S
      from
        (select rownum R, V.store_name, V.S from
          (select store_name, sum(total_sales) S
           from sales_fact
           group by store_name
           order by 2 desc) V
    group by store_name,R2
    order by R2;It produces the following output:STORE_NAME       SUM2
    Store A          1200
    Store C           300
    Store B           200
    Store X           120
    Store Q            90
    OTHER              45

  • Tags, no longer displaying file names and other issues

    I upgraded to Mavericks, MacBook Air.
    I need help sorting out what is going on with Tags.
    I have a screen shot, but uploading it to this post is another problem I have run into with Mavericks.  I click on the camera icon, click on upload file, and then I get a list of greyed out files, and am unable to select any of them.  Very unmac like.
    Back to the tag issue.  The tags are listed in the open finder window.  Most of the tags I have created, when selected, will display all the files with that tag, and show the file name or icon.
    BUT, one of my tags, which has over a thousand files, will not display the file names.  What is shown are a list of blank icons, and no file names.  The preview for each file still shows as it should when a file is selected, and the file name is listed in the preview.
    A picture is worth a thousand words, so I really wish I could have uploaded the screen shot!
    In addition, some of the files, e.g. a .pdf file, will show no icon, no file name, no file size, but will open when double clicked and dispaly the file name and a greyed out addition to the file name "-Locked".  Much weirdness.
    Tags have not been working well for me.  I have used colours extensively in the past for organization and now it seems to be a huge problem converting to tags.  What a painful transition from Mountain Lion!

    With the backup completed, I followed your suggestion:
    "Go to your Finder "Go" menu hold the option key and choose Library. Then go to Preferences folder and trash these files:
    com.apple.finder.plist
    com.apple.sidebarlists.plist
    Then, restart, or log out and in again."
    The smart folders disappeared.  The original Tags named by colour are back on the list of Tags, and the problems remain unchanged.
    In the Tags I created for my file collection, call it the LotsOfFiles folder, there are no file names listed, none.
    However, when I changed the permissions on every file in the LotsOfFiles folder to Staff-Read & Write, then I was able to change, add, and delete Tags from the files.  Also, once the permissions were changed the file names appeared, after five minutes... so I edited this entry when I discovered the change.
    The files in LotsOfFiles have been collected since 1995, and have been saved to many computers and many backup systems.  They also have been used, saved, changed etc. in operating systems dating back to OS7, and almost every operating system up to 10.9.  They also are being used on different computers right now, one running OS 10.3.9. one running 10.7, and one running 10.9.  The computers all have different admin logins and info.
    But I still can't upload files to this forum!

  • Weird problems with motion 3 displaying pink lines and other garbage

    I am using Motion3 to create HD graphics. With each of my projects I start with motion everything is fine until I build about 4 different layers or add any type of motion or filters.
    It seems as my projects get more complex my viewer window or canvas starts displaying weird things. Pink lines, white and black garbage, nasty thin lines, various other junk. Sometimes the image is completely gone.
    I have had some luck retrieving it by turning off motion blur or turning of field rendering and turning it back on. This fix only works sometimes.
    Other times my video displays fine until I render out and then the garbage happens.
    Anyone come across this?
    I am currently using a an ati radeon 9600 video card and it's running two monitors on dvi and one vga. I have ordered an nvidia 7800 gs in hopes it will fix this problem and ease the pain of render times.
    I have been using motion 2 for a while and never had this issue. I was hoping to milk this system for a while before having to upgrade.
    Any thoughts or suggestions?

    I think you are pushing that card to it's limit with HD and splitting the VRAM across two monitors. I would bet a new card will clear things up.

Maybe you are looking for

  • 500 internal server error

    i am using jdk1.3.1_02 java webserver2.0 and internet explorer 6.0 i am trying a servlet sample from "Java Servlet programming" of OREILLY .it contains a html form(one text field and one command button).i entered my name in text field and after click

  • Module Adapter - String Change in XML

    Module Adapter I have been reading "How to Create Modules for the J2EE Adapter Engine" and am trying to implement an adapter module to change a few strings in the message. I understand I can grab the XI message using the getPrincipalData such as: //

  • Can't see msgs in UWC / reconstruct fails with cannot retrieve message uid

    I have restored several email accounts into a test email account. I'm trying to move some of the .msg files around so that they are easier to find. I have created some new folders and when I move the messages into the folder, I cannot see them in the

  • Keyboard doesn't show to type id apple password!!

    Whenever I need to type my password from id apple (to update or buy app on app store) the keyboard doesn't appear. I can't submit my password and update my apps on ipad1. Any ideas?

  • Configuring USB mouse in XFree

    Hey, I just installed arch, and I'm having trouble getting X to see my mouse. It gets an error on the line in XF86Config that gives the mouse location default /dev/mouse doesn't work. It's a USB Logitech MouseMan Dual Optical. I've taken a look throu