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

Similar Messages

  • 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

  • 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

  • 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

  • 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

  • It wont show my music it only shows top songs and other types of things on the iTunes store. how do i fix this?

    how do i make it so i can see my music again. it only shows songs i can buy and it shows songs that are related to music that i i already have on my iTunes library,but it will not show my library anymore.

    robcharlus wrote:
    The old iTunes libraries do not restore any playlists or song counts.
    They should you if you do the roll back properly... Opening files from the Previous iTunes Libraries folder in Windows Explorer simply opens the current library. If you don't see the .itl file extension then don't give your copied and renamed file the extention or iTunes will create an empty library rather than using the renamed file.
    If you had a complete pre-problem backup of your library you could restore that. On the assumption that isn't possible I have a script called ExportImport that could in principle be adjusted to save the relevant data from a backup of the library database and then reimport that data into the current library. See this thread for details.
    tt2

  • Since my iPad IOS was updated to 7.0.4, when I send a Pages doc as a Word docx to my kindle the text is all scrunched up down one side as if the letters are on top of each other.  It worked find before and the docx are OK when imported to Word.

    Since my iPad 2 was updated to IOS 1.0.4, I cannot send a docx from Pages to my kindle.  I can to my PC and open it in Word.  But when I send a pages document and select Word as the format, the letters appear on my kindle screen down the left side, printed on top of each other.  It worked fine before the upgrade.  Any suggestions? 

    What version of Pages are you using? Did you upgrade to Pages 2.1 for iOS?

  • A year or so ago I had turned on a toolbar that sat at the top with the other toolbar, and had many tools for development and checking of websites. You could tu

    A year or so ago I had turned on a toolbar that sat at the top with the other toolbar, and had many tools for development and checking of websites. You could turn Java on/off, javascript on/off, turn on source view, and many other things. Now I cant find that toolbar. All that I can find now turns on a panel in the lower half of the window that probably does all the same stuff, but it takes up much more room. Where did that toolbar go? or was it an add-on or plug-in?

    It sounds like you may be referring to the Web Developer add-on.
    * https://addons.mozilla.org/firefox/addon/web-developer/

  • I closed the address, search and other bars, ..all I have showing up top is the tabs bar, and right clicking anywhere up top does not give me the option of reopening these other bars. Help!

    sorry, meant to say that right clicking up top..everywhere I try..does NOT give me the option of reopening the address..and other...bars.

    If you press Ctrl+n to open a new window, does it have all the menus and toolbars?
    If you restart Firefox, does the display return to normal?
    If those don't work, you could try Firefox's Safe Mode. This will let you temporarily disable add-ons to work around any problem there.
    You might want to back up Firefox before using Safe Mode. For help with that, see [https://support.mozilla.com/en-US/kb/Backing+up+your+information Backing up your information].
    Next, try starting Firefox in Firefox
    [http://support.mozilla.com/kb/Safe+Mode Safe Mode]. Be careful not to "reset" anything permanently if you didn't back up.
    Does that restore your menus and toolbars?

  • In FCPX can I stack clips of multiple angles on top of each other and choose what parts I want to make my movie out of?

    Hi there
    I'm debating whether to purchase FInal Cut Pro X or not and I'm new(ish) to video editing.
    What I have done so far is produce a music video mimed to audio and shot at about 20 different angles. Each angle is the length of the ENTIRE song, not just snipets.
    What I want to be able to do is have those 20 videos sitting stacked up on top of each other (completely synced to the audio) and be able to choose what parts of what video I make my final video out of.
    So I want to be able to tell the system to start at angle 1, then at a specific time move to angle 6, then angle 19, then back to angle 1, then angle 16 etc etc etc.
    But I dont want to cut up the parts of each camera angle first, I want to be able to select a specific part to play from each ENTIRE camera angle.
    Is this possible please? And also what is the correct terminology for this process?
    I apologise for not using the correct terminology here, as I dont know the correct words for what I am trying to explain.
    Thanks

    FCPX mulitcam editing is the most advanced of any NLE on the market at the moment.
    Read the user manual here to learn how Multiclips work.
    http://help.apple.com/finalcutpro/mac/10.0.6/#ver23c76439
    You'll want to learn about how to work with Audio Channels with multiclips, also.  Very powerful.
    http://help.apple.com/finalcutpro/mac/10.0.6/#verc1fab5f6
    Here is my article on audio channels in Multiclips.
    http://www.macprovideo.com/hub/final-cut/final-cut-pro-multiclip-audio-channel-e diting-1006

  • My email settings are messed up. The INBOX and NEW FOLDER tabs are on top of each other so that I cannot open a new folder.

    The INBOX tab and the NEW FOLDER tab are entangled and are sitting one on top of the other so it's impossible to create a new email folder.
    == This happened ==
    Every time Firefox opened
    == Not sure. Maybe about two weeks ago.

    '' the bookmark facility is not functional in 29 ... Bookmark puts all bookmarks there into "recently bookmarked" ''
    It does not.
    It works much the same as the old system does. Or at least it should do and does do for me.
    * Carefully reads the following article so you are certain what should be happening '''[[How to use bookmarks to save and organize your favorite websites ]]'''
    # From an unbookmarked page click the bookmarks star.
    #* That results in the bookmark being added, and yes initially it is just as an unsorted bookmark. (No doubt that is where most people put most bookmarks)
    # IMPORTANT click the star a second time. (But not so rapidly it counts as a doubleclick)
    #* You now have the options you had in the old version of Firefox <br /> Create new folders <br /> Save to a recently used folder <br /> Show all bookmark folders - and expand nested folders
    If your bookmarks are not working possibly the file is corrupted in which case see
    * http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox#Damaged_Places_database
    I am hoping it is just that you are doubleclicking the star too quickly.

  • I have been unsuccessful merging serval pdf files into one file.  I select the Sidebar for both pdfs, then drag one pdf on top of the other and Save the Version.  When I open the file I think I have saved, it shows only the original pdf.  Advice would be

    I have been unsuccessful merging serval pdf files into one file.  I select the Sidebar for both pdfs, then drag one pdf on top of the other and Save the Version.  When I open the file I think I have saved, it shows only the original pdf.  Advice would be appreciated.  Thank you.

    wouldnt it be easier if you could do something like this?
    https://discussions.apple.com/thread/3392535

  • I have an iMac desk top, iPad, and two iPhones. Someone (a family relative) has somehow copied text messages, and possibly emails from our iPhones, and sent them to other people. He has had access to my wife's iPhone numerous times. Can I check our iPhone

    I have an iMac desk top, iPad, and two iPhones. Someone (a family relative) has somehow copied text messages, and possibly emails from our iPhones, and sent them to other people. He has had access to my wife's iPhone numerous times. Can I check our iPhones to detect any surveillance apps(bugs) on them?

    Whose Apple ID are you using? It sounds like whoever co-opted the account may have changed the security questions as well.
    Follow the instructions here: http://support.apple.com/kb/HT5665
    What should I do if I don't remember the answers to my Apple ID security questions?
    Try answering them at least once to see if you can get them right, even if you are not sure you remember the answers to your security questions.
    If you are confident you can't remember them, try one of the following:
    If you have three security questions and a rescue email address
    sign in to My Apple ID and select the Password and Security tab to send an email to your rescue email address to reset your security questions and answers. 
    If you have one security question and you know your Apple ID passwordsign in to My Apple ID and select the Password and Security tab to reset your security question.
    If you have one security question, but don't remember your Apple ID password
    contact Apple Support for assistance. Learn more about creating a temporary support PIN to help Apple confirm your identity when you contact Apple Support.
    Note: If you have forgotten your password and answer your security questions incorrectly too many times in a row, you will be unable to try to answer your security questions for a period of time. During that time you will not be able to reset your password and will not have access to your account.

  • When I open TWC, the site opens twice, not right on top of each other but skewed to the right. I can read it and it won't search locations.

    For the last 3 days, when I open TWC it has two images of the site on top of each other, as if the site opened two times.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • On the top left of my computer screen there are what look like the bottom half of small grey and white squares stacked on top of each other. They form a line about three inches long and I cant seem to get rid of them.  Is my computer dying or being hacked

    On the top left of my computer screen there are what look like the bottom half of small grey and white squares stacked on top of each other. They form a line about three inches horizontally along the top and they cover half of the regualr bar (so half of the apple sign int he corner is covered) and I cant seem to get rid of them.  Is my hardrive crashing or being hacked?

    I have never seen DEVELOP on the menu bar for Safari, hence my query regarding testing. 
    What OS are you using and what version of Safari?
    If you want to check your HDD, Open Disk Utilities>First Aid and run Verify and Repair.
    The only remedy that I can think of that may work is an OS reinstall.
    I seriously doubt that your MBP is being hacked.
    Ciao.

Maybe you are looking for

  • Mail Adapter Error occured in Adapter Monitoring....

    Hi I have done the Mail>XI>File senario.... the xi server is sometimes its picking up the mails but some times its not picking... i have give trasport protocol as IMAP4 and url as pop://ipaddress.... I have created the asyncronus message types...n i

  • MacOS 10.5 Compatibility with ChemDraw

    I am having problems with ChemDraw Ultra 9.0 and the ability to save documents using Leopard. Each time I try to save a document, the application crashes. The console log indicates a bus error. I have found a work around. In the ChemDraw Ultra 9 Pref

  • Mitigation Notification

    Dear colleagues! I have tried to find any information regarding my question... and have not found any solutions or discussions :\ I have the following issue: Is it possible to notify Mitigation (or Risk) Owner about using his/her Mitigation? I.e. App

  • Cannot access iTunes. gives a folder locked message

    How do I correct a problem accessing iTunes.  It is telling me the folder is locked or I do not have write permission.  I am the administrator.

  • Yahoo groups notification moderate email, attachments missing

    i am a moderator of a Yahoo! Group that has moderated posts. every time that someone posts a message, i receive an email from Yahoo! Groups Notification with the subject line MODERATE -- ... in the email, it states that "A complete copy of this messa