Report Count Wide Range of Categories

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

"Field1" is a combo box with about 50 different categories. I have created
a report, and would like to count records according to what "Field1" category
they belong to.

Currently, the records are grouped according to "IDNumber". How does one
perform grouping of "Field1" categories within the different "IDNumber"
groups, and how does one count "Field1" groups within a particular "IDNumber"
group?

Thank you,
Diana
 
In query design view click on the Epsilon icon (5th letter of Greek alphabet)
on the tool bar. Use the setup below.

Field: IDNumber Field1 Field1
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:


Field: Field1 IDNumber IDNumber
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:

I would not think it would work both ways - Field1-IDNumber and
IDNumber-Field1 as one would be part of the other but not the reverse.
 
Hi,

I tried your suggestion but am not getting the right results. The count for
field1 shows all existing records with any entry in field1. Also, the counts
are not grouped by IDNumber. To be clear, I have 11 total records (this is a
test-database). For my count, I get 11 records. I also tried narrowing down
the counts by category by entering the appropriate textstrings as criteria.
However, I get an error when I try this.

Is there any way to count records in a group within a group directly in the
report?

I tried using DCount("field1", "[MyTable]", "field1='sometextphrase') in the
IDNumber header of the report, but the count operation counts ALL records
rather than just records under the particular ID#.

Thanks,
Diana
 
In report design view click on menu View - Grouping and Sorting.
Select the field you want the group on. Select Yes for a footer.
In the form put the field you are grouping on in the footer and create a
text box with =Count([YourFieldToBeCounted])


DianaS said:
Hi,

I tried your suggestion but am not getting the right results. The count for
field1 shows all existing records with any entry in field1. Also, the counts
are not grouped by IDNumber. To be clear, I have 11 total records (this is a
test-database). For my count, I get 11 records. I also tried narrowing down
the counts by category by entering the appropriate textstrings as criteria.
However, I get an error when I try this.

Is there any way to count records in a group within a group directly in the
report?

I tried using DCount("field1", "[MyTable]", "field1='sometextphrase') in the
IDNumber header of the report, but the count operation counts ALL records
rather than just records under the particular ID#.

Thanks,
Diana


KARL DEWEY said:
In query design view click on the Epsilon icon (5th letter of Greek alphabet)
on the tool bar. Use the setup below.

Field: IDNumber Field1 Field1
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:


Field: Field1 IDNumber IDNumber
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:

I would not think it would work both ways - Field1-IDNumber and
IDNumber-Field1 as one would be part of the other but not the reverse.
 
Hi,

When I tried your suggestion, I got a count of "1" after each record rather
than subtotal counts for each category of Field1 within a particular IDnumber
group.

Diana

KARL DEWEY said:
In report design view click on menu View - Grouping and Sorting.
Select the field you want the group on. Select Yes for a footer.
In the form put the field you are grouping on in the footer and create a
text box with =Count([YourFieldToBeCounted])


DianaS said:
Hi,

I tried your suggestion but am not getting the right results. The count for
field1 shows all existing records with any entry in field1. Also, the counts
are not grouped by IDNumber. To be clear, I have 11 total records (this is a
test-database). For my count, I get 11 records. I also tried narrowing down
the counts by category by entering the appropriate textstrings as criteria.
However, I get an error when I try this.

Is there any way to count records in a group within a group directly in the
report?

I tried using DCount("field1", "[MyTable]", "field1='sometextphrase') in the
IDNumber header of the report, but the count operation counts ALL records
rather than just records under the particular ID#.

Thanks,
Diana


KARL DEWEY said:
In query design view click on the Epsilon icon (5th letter of Greek alphabet)
on the tool bar. Use the setup below.

Field: IDNumber Field1 Field1
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:


Field: Field1 IDNumber IDNumber
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:

I would not think it would work both ways - Field1-IDNumber and
IDNumber-Field1 as one would be part of the other but not the reverse.

:

Hello,

"Field1" is a combo box with about 50 different categories. I have created
a report, and would like to count records according to what "Field1" category
they belong to.

Currently, the records are grouped according to "IDNumber". How does one
perform grouping of "Field1" categories within the different "IDNumber"
groups, and how does one count "Field1" groups within a particular "IDNumber"
group?

Thank you,
Diana
 
Raise the level of your grouping one layer.
Vegatables
Cabbage
Turnip
Fruit
Peach
Pear
Nuts
Pecan
Peanut

Count on the field that has data of Vegatable/Fruit/Nuts so you count all
the varities in the category.

DianaS said:
Hi,

When I tried your suggestion, I got a count of "1" after each record rather
than subtotal counts for each category of Field1 within a particular IDnumber
group.

Diana

KARL DEWEY said:
In report design view click on menu View - Grouping and Sorting.
Select the field you want the group on. Select Yes for a footer.
In the form put the field you are grouping on in the footer and create a
text box with =Count([YourFieldToBeCounted])


DianaS said:
Hi,

I tried your suggestion but am not getting the right results. The count for
field1 shows all existing records with any entry in field1. Also, the counts
are not grouped by IDNumber. To be clear, I have 11 total records (this is a
test-database). For my count, I get 11 records. I also tried narrowing down
the counts by category by entering the appropriate textstrings as criteria.
However, I get an error when I try this.

Is there any way to count records in a group within a group directly in the
report?

I tried using DCount("field1", "[MyTable]", "field1='sometextphrase') in the
IDNumber header of the report, but the count operation counts ALL records
rather than just records under the particular ID#.

Thanks,
Diana


:

In query design view click on the Epsilon icon (5th letter of Greek alphabet)
on the tool bar. Use the setup below.

Field: IDNumber Field1 Field1
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:


Field: Field1 IDNumber IDNumber
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:

I would not think it would work both ways - Field1-IDNumber and
IDNumber-Field1 as one would be part of the other but not the reverse.

:

Hello,

"Field1" is a combo box with about 50 different categories. I have created
a report, and would like to count records according to what "Field1" category
they belong to.

Currently, the records are grouped according to "IDNumber". How does one
perform grouping of "Field1" categories within the different "IDNumber"
groups, and how does one count "Field1" groups within a particular "IDNumber"
group?

Thank you,
Diana
 
Hi,

Thanks for the help. It's not quite what I want yet though, because I still
get a lump sum of all of the categories, although the record counts are
grouped by IDNumber now (awesome!).

Using a variation of your example, say you have many vegetable stores: Veg1,
Veg2, Veg3, Veg4, etc stored in field [VegStore].

Each vegetable store has a different inventory of turnips and cabbages (type
of vegetable is stored in [VegType] field as text "turnip" or "cabbage").
You would like to count how many turnips and cabbages EACH store has. Thus,
you need to count the number of records with [VegType]=turnip and number of
records with [Vegtype]=cabbage for EACH vegetable store [VegStore].

How would you do this? It seems Count([VegType]) is not sufficient for
doing the task because it counts the total number of vegetables within a
store, rather than the number of turnips and the number of cabbages within a
particular store.

Thanks,
Diana

KARL DEWEY said:
Raise the level of your grouping one layer.
Vegatables
Cabbage
Turnip
Fruit
Peach
Pear
Nuts
Pecan
Peanut

Count on the field that has data of Vegatable/Fruit/Nuts so you count all
the varities in the category.

DianaS said:
Hi,

When I tried your suggestion, I got a count of "1" after each record rather
than subtotal counts for each category of Field1 within a particular IDnumber
group.

Diana

KARL DEWEY said:
In report design view click on menu View - Grouping and Sorting.
Select the field you want the group on. Select Yes for a footer.
In the form put the field you are grouping on in the footer and create a
text box with =Count([YourFieldToBeCounted])


:

Hi,

I tried your suggestion but am not getting the right results. The count for
field1 shows all existing records with any entry in field1. Also, the counts
are not grouped by IDNumber. To be clear, I have 11 total records (this is a
test-database). For my count, I get 11 records. I also tried narrowing down
the counts by category by entering the appropriate textstrings as criteria.
However, I get an error when I try this.

Is there any way to count records in a group within a group directly in the
report?

I tried using DCount("field1", "[MyTable]", "field1='sometextphrase') in the
IDNumber header of the report, but the count operation counts ALL records
rather than just records under the particular ID#.

Thanks,
Diana


:

In query design view click on the Epsilon icon (5th letter of Greek alphabet)
on the tool bar. Use the setup below.

Field: IDNumber Field1 Field1
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:


Field: Field1 IDNumber IDNumber
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:

I would not think it would work both ways - Field1-IDNumber and
IDNumber-Field1 as one would be part of the other but not the reverse.

:

Hello,

"Field1" is a combo box with about 50 different categories. I have created
a report, and would like to count records according to what "Field1" category
they belong to.

Currently, the records are grouped according to "IDNumber". How does one
perform grouping of "Field1" categories within the different "IDNumber"
groups, and how does one count "Field1" groups within a particular "IDNumber"
group?

Thank you,
Diana
 
Never mind last post. Thanks for the help! :) My group layering was
wrong--problem is fixed now.

KARL DEWEY said:
Raise the level of your grouping one layer.
Vegatables
Cabbage
Turnip
Fruit
Peach
Pear
Nuts
Pecan
Peanut

Count on the field that has data of Vegatable/Fruit/Nuts so you count all
the varities in the category.

DianaS said:
Hi,

When I tried your suggestion, I got a count of "1" after each record rather
than subtotal counts for each category of Field1 within a particular IDnumber
group.

Diana

KARL DEWEY said:
In report design view click on menu View - Grouping and Sorting.
Select the field you want the group on. Select Yes for a footer.
In the form put the field you are grouping on in the footer and create a
text box with =Count([YourFieldToBeCounted])


:

Hi,

I tried your suggestion but am not getting the right results. The count for
field1 shows all existing records with any entry in field1. Also, the counts
are not grouped by IDNumber. To be clear, I have 11 total records (this is a
test-database). For my count, I get 11 records. I also tried narrowing down
the counts by category by entering the appropriate textstrings as criteria.
However, I get an error when I try this.

Is there any way to count records in a group within a group directly in the
report?

I tried using DCount("field1", "[MyTable]", "field1='sometextphrase') in the
IDNumber header of the report, but the count operation counts ALL records
rather than just records under the particular ID#.

Thanks,
Diana


:

In query design view click on the Epsilon icon (5th letter of Greek alphabet)
on the tool bar. Use the setup below.

Field: IDNumber Field1 Field1
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:


Field: Field1 IDNumber IDNumber
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:

I would not think it would work both ways - Field1-IDNumber and
IDNumber-Field1 as one would be part of the other but not the reverse.

:

Hello,

"Field1" is a combo box with about 50 different categories. I have created
a report, and would like to count records according to what "Field1" category
they belong to.

Currently, the records are grouped according to "IDNumber". How does one
perform grouping of "Field1" categories within the different "IDNumber"
groups, and how does one count "Field1" groups within a particular "IDNumber"
group?

Thank you,
Diana
 
I have the following in a table --
ID DOS Plan PlanCovg
10 1/5/2004 P1 N
10 1/5/2004 P1 Y
10 2/5/2004 P1 Y
10 2/5/2004 P1 N
11 3/5/2004 P3 Y
12 4/5/2004 N
13 5/5/2004 P4 Y
13 6/5/5004 P4 N
13 7/5/2004 P4 N

I have Sorting and Grouping --
DOS Ascending
Plan Ascending
Header Yes
Footer Yes

Report has Plan in Plan Header and =Count([PlanCovg]) in Plan Footer.

I get the following results in the report --
Plan: P1
ID: 10 DOS: 1/5/2004
ID: 10 DOS: 1/5/2004
PlanCovg: 2

Plan: P1
ID: 10 DOS: 2/5/2004
ID: 10 DOS: 2/5/2004
PlanCovg: 2

Plan: P3
ID: 11 DOS: 3/5/2004
PlanCovg: 1

Plan:
ID: 12 DOS: 4/5/2004
PlanCovg: 1

Plan: P4
ID: 13 DOS: 5/5/2004
PlanCovg: 1

Plan: P4
ID: 13 DOS: 7/5/2004
PlanCovg: 1

Plan: P4
ID: 13 DOS: 6/5/5004
PlanCovg: 1

Just make your substitutions.

DianaS said:
Hi,

Thanks for the help. It's not quite what I want yet though, because I still
get a lump sum of all of the categories, although the record counts are
grouped by IDNumber now (awesome!).

Using a variation of your example, say you have many vegetable stores: Veg1,
Veg2, Veg3, Veg4, etc stored in field [VegStore].

Each vegetable store has a different inventory of turnips and cabbages (type
of vegetable is stored in [VegType] field as text "turnip" or "cabbage").
You would like to count how many turnips and cabbages EACH store has. Thus,
you need to count the number of records with [VegType]=turnip and number of
records with [Vegtype]=cabbage for EACH vegetable store [VegStore].

How would you do this? It seems Count([VegType]) is not sufficient for
doing the task because it counts the total number of vegetables within a
store, rather than the number of turnips and the number of cabbages within a
particular store.

Thanks,
Diana

KARL DEWEY said:
Raise the level of your grouping one layer.
Vegatables
Cabbage
Turnip
Fruit
Peach
Pear
Nuts
Pecan
Peanut

Count on the field that has data of Vegatable/Fruit/Nuts so you count all
the varities in the category.

DianaS said:
Hi,

When I tried your suggestion, I got a count of "1" after each record rather
than subtotal counts for each category of Field1 within a particular IDnumber
group.

Diana

:

In report design view click on menu View - Grouping and Sorting.
Select the field you want the group on. Select Yes for a footer.
In the form put the field you are grouping on in the footer and create a
text box with =Count([YourFieldToBeCounted])


:

Hi,

I tried your suggestion but am not getting the right results. The count for
field1 shows all existing records with any entry in field1. Also, the counts
are not grouped by IDNumber. To be clear, I have 11 total records (this is a
test-database). For my count, I get 11 records. I also tried narrowing down
the counts by category by entering the appropriate textstrings as criteria.
However, I get an error when I try this.

Is there any way to count records in a group within a group directly in the
report?

I tried using DCount("field1", "[MyTable]", "field1='sometextphrase') in the
IDNumber header of the report, but the count operation counts ALL records
rather than just records under the particular ID#.

Thanks,
Diana


:

In query design view click on the Epsilon icon (5th letter of Greek alphabet)
on the tool bar. Use the setup below.

Field: IDNumber Field1 Field1
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:


Field: Field1 IDNumber IDNumber
Table: YourTable YourTable
Total: Group By Group By Count
Sort:
Show:
Criteria:
or:

I would not think it would work both ways - Field1-IDNumber and
IDNumber-Field1 as one would be part of the other but not the reverse.

:

Hello,

"Field1" is a combo box with about 50 different categories. I have created
a report, and would like to count records according to what "Field1" category
they belong to.

Currently, the records are grouped according to "IDNumber". How does one
perform grouping of "Field1" categories within the different "IDNumber"
groups, and how does one count "Field1" groups within a particular "IDNumber"
group?

Thank you,
Diana
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top