Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to counting group? 1

Status
Not open for further replies.

bloomlight

IS-IT--Management
Jun 12, 2006
149
US
I have a report with groups....and need to count total grouped records at the end...how could I do that?

example:

Name ServiceDate ServiceType
John 03/02/13 B
John 03/11/13 A
John 04/01/13 B
Sandy 04/20/13 C
Sandy 05/20/13 C
John 06/10/13 F

the customer may use same "Servicetype" with different dates.....this particular report is to show how many different "serviceTypes" that each customer used.

Report:

Name ServiceType
John A
John B
John F
Sandy C

so the total is 4, not the 6.....how could I accomplish this?
Any help would be greatly appreciated!
 
Try this.

Create a formula (I've it called CountBy) that concatenates the Name and Service Type, as follows:

[Code {@CountBy}]
{Table.Name} + '/' + (Table.ServiceType}
[/Code]

Then create a Running Total:

[pre]
Field to Summarize: {@CountBy}
Type of Summary: Distinct Count
Evaluate: For Each Record
Rest: Never
[/Pre]


Hope this helps

Cheers
Pete
 
Are you trying to count just the distinct name and service type pairs? If so create a formula that concatenates the name and service type then create a summary that performs a distinct count of the formula and displays it for the groups.

Code:
// formula @NameType
{name} + ' ' + {ServiceType}
 
Thanks for both of you! I have used Pete's suggestion and it worked!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top