Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Select Top N, by Sum of Count Post Reply Post New Topic
Author Message
bthews
Newbie
Newbie


Joined: 06 Apr 2009
Location: United States
Online Status: Offline
Posts: 1
Quote bthews Replybullet Topic: Select Top N, by Sum of Count
    Posted: 06 Apr 2009 at 11:49am
I have seen several threads similar to this, but none seem to answer my question:
 
I have a list of Deals that Can be grouped by state.
I want to see a bar chart of the Top 3 states based on the number of deals grouped by state.
 
So my data might look like this:
 
DealId          State
1000            TX
1001            TX
1002            TX
1003            NY
1004            NY
1005            FL
1007            CA
1008            CA
1009            CA
 
 
So my chart should show TX (3), NY (2), CA (3)
 
What is the best way to do this?
I just can't figure out how to use the TOP N function/grouping to accomplish this...
 
Thank you for any suggestions!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Apr 2009 at 1:10pm
Group by state.
Set a summary as a count of DealID at State group level
Go to group sort expert and select sort fot his group by Top N
where n=3
Use this to create your bar chart


Edited by DBlank - 06 Apr 2009 at 1:12pm
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.