Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Sum a Distinct Count Post Reply Post New Topic
Author Message
ppie
Newbie
Newbie


Joined: 18 Dec 2011
Location: United States
Online Status: Offline
Posts: 5
Quote ppie Replybullet Topic: Sum a Distinct Count
     Posted: 18 Dec 2011 at 1:25pm

Looking to Sum a Distinct Count Field

Using Crystal 11 I am trying to get a total of my grouping which I have a distinct count of computer names but in each group I have detail records with the same computer name.  I am grouping on a field name Application

 

Example

Distinct Count    Name                                    Application = ABC

2                              Computer_Name_1

                                Computer_Name_2

                                Computer_Name_1

                                Computer_Name_1

                                                                                Application = CBA

2                              Computer_Name_3

                                Computer_Name_4

                                Computer_Name_3

                                Computer_Name_3

Total I am looking for is 4 in the Report Footer

Thank you
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 19 Dec 2011 at 7:36am
Try putting your distinct count formula into report footer.
DistinctCount(computername)
IP IP Logged
ppie
Newbie
Newbie


Joined: 18 Dec 2011
Location: United States
Online Status: Offline
Posts: 5
Quote ppie Replybullet Posted: 19 Dec 2011 at 8:11am
Thanks but each group may have the same computer name, so it does not give the correct number of the sum for each group,  example is that Group ABC has 3 records 2 of the records have the same computer name, so for that group the distinct count will be two.  The next Group CBA may contain the same computer names as group ABC.  If I just put it in the footer then I do not get the total count for each group.
Thank you
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 19 Dec 2011 at 8:49am
than you could use a crosstab or create a running total.
running total
just select the field to evaluate
evaluate on change of your Application group
and set reset to never.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Dec 2011 at 4:01pm
Make a formula field of application+computer name and do a distinct count of that
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