If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Crosstab query totals
My sql
TRANSFORM Count(QDailyWheplingReport2.[NEST #]) AS [The Value] SELECT QDailyWheplingReport2.[WHELPING DATE], Count(QDailyWheplingReport2.[NEST #]) AS [Total Of NEST #] FROM QDailyWheplingReport2 GROUP BY QDailyWheplingReport2.[WHELPING DATE] PIVOT QDailyWheplingReport2.[SHED #]; I am trying to understand how the total works. I have columns which are shed numbers from 1 to 50 The rows are dates, the days that litters were born. The nests are the count of each litter, (the value) At the top of the query data view is a total of the nests in each shed, and as the dates or rows accumulate and liters are born each day, the total goes down as the nest's column count goes up. I would like a sum of all the days count, (Excluding the total at the top) so I know how many litters were born in that shed. My problem is when I make a report off this query and bring down the field list There is a [Whelping Date] field, a [Total Of NEST #] field, and all the [Shed] fields when I put the shed field in the report and view the report this total is at the top and all the days counts are there, BUT How do I access the total to subtract it from my column sum, when I sum the shed field? Thanks for any suggestions Blair |
Thread Tools | |
Display Modes | |
|
|