Skip to Content
author's profile photo Former Member
Former Member

Sorting a Bar Chart

I'm using Crystal XI

I have a bar chart which lists salesstaff names for each bar and sales amount for the level of the bar. I want those with a specific region (a field in the database) for the bar and a "catch-all" of "Others" for those where the region is null or blank.

So far I have this and it works well. Except...

The bars are sorted alphabetically by the salesperson's name, which is ok. However the catch-all "Others" appears between Ned Newman and Paul Peterson. I would like the "Others" bar to be at the end.

I tried creating a formula that would return the salesperson's name except when it is "Others" in which case I return "ZZZZZ". Then, in the Chart Expert, under the Data tab, I selected the "On change of" field and clicked "Sort". I selected my sorting formula and then ran the report. All was well, except instead of the "Others" label, the label read "ZZZZZ".

(Note, in the about I used quotes to surround "Others" and "ZZZZZ". In actuality these values don't have quotes.)

So, how do I sort without visible changing the bar labels?

TIA

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Nov 09, 2012 at 06:42 PM

    hey guys,

    as another workaround, how about using an ascii character to append to "Others" instead of using "zzzz" as the default...

    e.g. try one of the following as the default value, and then you don't have to manually edit chart labels.

    "ʘ - " + "Others"

    or use the following...i know, it's got a dot in the middle but it looks pretty close to an O 😊

    "ʘthers"

    unfortunately a lot of the ascii characters don't really sort properly in charts or in the sort expert (at least in my version of cr2011) which to me is a bug. so you really have to try a lot of the different ascii characters to find one that's tolerable. or hopefully the sort works for all of your ascii values in your version.

    cheers,

    jamie

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      What a perfectly wonderful idea! Thanks! :-)

      I don't know why I didn't think of it before, using "other than normal" ASCII characters is how I sometimes get around forum profanity filters.

      (No, it's not what you think. Some of the forums I visit would filter out "Dick Chaney" as "**** Chaney")

  • Posted on Nov 07, 2012 at 08:48 PM

    Hi Clifton,

    Could you try this:

    1) Go to Chart Expert > select the formula field > Click on Order and choose "Original Order"

    2) Then create another formula with a code similar to this:

    if {region} <> "Specific Region" then "ZZZZ" else

    {region}

    3) Go to Record Sort Expert > Add this formula to the list

    If that doesn't help, you would need to manually Edit the Label and make it "Others"

    - Abhilash

    Follow us on Twitter

    Got Enhancement ideas? Try the SAP Idea Place

    Share Your Knowledge in SCN Topic Spaces

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.