Link to home
Start Free TrialLog in
Avatar of Marcos27
Marcos27Flag for United States of America

asked on

How to Make a Bar Graph in Descending order (based on my Running Total Field)

Hello Experts -

I'm trying to graph some simple data. I have 20 recordIDs, and each record has a color field (blue, red, green, purple). I want to group by color in my Crystal Report (X), so that I have 5 blue, 3 Red, 8 Green, and 4 Purple. If I graph # of records on the Y axis, color group on the X, how can I have the graph display the largest group first - so it would show Green, then Blue, Purple and Red, like a decending staircase.

Thanks,
Marcos
Avatar of Mike McCracken
Mike McCracken

I don't know.  Can you upload the report with some data so I can try a couple of ideas?

mlmcc
Avatar of Marcos27

ASKER

It's actually a much more complicated report linked to secure tables here at work, so I don't have anything to upload. I simplified the the question just to illustrate the basic idea of what I'm trying to do. It doesn't seem like I can order by the Running Total field (# of events per group). Maybe I have to create a stored procedure and group prior to pulling into Crystal.??

If nobody has an easy solution, I can find a work around. Thanks.
You can't order by the running total because it is calculate after the grouping and sorting is done.

Can you use a SUMMARY (count) for the running total?

mlmcc
I'm not sure what you mean. I have a chart that shows color groups (on change of Color) - along the X axis. The Y axis is RecordID - which is set as a Summary (count). I can set an order on Color field, but that order can only be ascending, descending, specified or original. None of those orders order the chart from high to low.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Well that was easy! In the Chart Expert you can just select the group --> TopN (Sort Expert), and then sort all by count of the records.

Brilliant! Thank you :)
Glad you found that.  I don't use charts very much so I didn't know it was there.

mlmcc