Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: need to distinct count two fields Post Reply Post New Topic
Author Message
chunkyluver
Newbie
Newbie


Joined: 26 Mar 2012
Online Status: Offline
Posts: 2
Quote chunkyluver Replybullet Topic: need to distinct count two fields
     Posted: 16 Apr 2012 at 4:18am
i have a data base that shows sales rep name in two fields (fname, lname). sometimes the sales rep will change over the life of the account. if it does the old sales rep name is moved to two differnt columns (prev lname, prev fname) and there is a field that indicates the date the change took place.
 
the report is grouped by the fname, lname (so grouped by current sales rep) and i use a formula to display the sales rep name for each record in the detail (if the sales took place before the change date the prev lname and fname are displayed if after the current sales rep is displayed).
 
now they want a distinct count of both prev sales rep and the current sales reps.
 
so if the sales rep changed yesterday but all of the sales on the report are from three years ago the count should show as two. one for the sales rep that actually made the sales and another for the one currently in charge of the account. If multiple accounts are returned for one sales rep the count should be distinct so still just two.  
 
any help is appreciated.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 16 Apr 2012 at 4:46pm
How is your report grouped?  What level do you need the counts at - Account, the whole report, something else?  If a sales rep is in the current fields for one account and the previous fields for another, do you still want to count the rep only once?
 
-Dell
IP IP Logged
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