# Trying again

D

#### Dennis

I am trying to create a query that calculates the count of
values can be and are 1, 2, 3, 4, and 5. I have been able
to count using DCount but, I have 5 cost centers and I
need seperate values for each cost center. Using this
getting is this result:

-----------------------------------------------------------
11 54 54 54 54 54
36 45 45 45 45 45
61 69 69 69 69 69
64 87 87 87 87 87
92 2 2 2 2 2
-----------------------------------------------------------
When I use this expression Grade1,2: (IIf([Cost Center]
this result:

-----------------------------------------------------------
11
36 45 45 45 45 45
61
64
92
-----------------------------------------------------------

I would like the query to look like this:

-----------------------------------------------------------
11 10 15 8 13 8
36 5 7 10 7 15
61 20 18 11 10 10
64 18 18 17 18 16
92 1 1

-----------------------------------------------------------
If possible, I could use a calculated field in a report
for each of the above results as the report is sorted by
cost center. Hopefully I made this info clear. Thanks,

Dennis

D

#### Dale Fye

concatenation of the word Grade to the value that is in the field?

Try this:

Create a new query. Add your table to the design grid, and make the
query a crosstab query

Select the [Cost Center] field, set its properties:
Field:Cost Center
Table:yourTable
Total: GroupBy

Table:yourTable
Total:GroupBy

Add another field to the grid, can be any numeric field
Field:
Table:yourTable
Total:Count
Crosstab:value

Then run the query. Is this what you are looking for?

--
HTH

Dale Fye

I am trying to create a query that calculates the count of
values can be and are 1, 2, 3, 4, and 5. I have been able
to count using DCount but, I have 5 cost centers and I
need seperate values for each cost center. Using this
getting is this result:

-----------------------------------------------------------
11 54 54 54 54 54
36 45 45 45 45 45
61 69 69 69 69 69
64 87 87 87 87 87
92 2 2 2 2 2
-----------------------------------------------------------
When I use this expression Grade1,2: (IIf([Cost Center]
this result:

-----------------------------------------------------------
11
36 45 45 45 45 45
61
64
92
-----------------------------------------------------------

I would like the query to look like this:

-----------------------------------------------------------
11 10 15 8 13 8
36 5 7 10 7 15
61 20 18 11 10 10
64 18 18 17 18 16
92 1 1

-----------------------------------------------------------
If possible, I could use a calculated field in a report
for each of the above results as the report is sorted by
cost center. Hopefully I made this info clear. Thanks,

Dennis