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
Crystal ReportsDatabasesMicrosoft SQL Server 2005

Avatar of undefined
Last Comment
Mike McCracken
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
Marcos27
Flag of United States of America image

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
Avatar of Marcos27
Marcos27
Flag of United States of America image

ASKER

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

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Marcos27
Marcos27
Flag of United States of America image

ASKER

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
Microsoft SQL Server 2005
Microsoft SQL Server 2005

Microsoft SQL Server 2005 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. It includes support for managing XML data and allows a database server to be exposed over web services using Tabular Data Stream (TDS) packets encapsulated within SOAP (protocol) requests.

72K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo