Report of 2 rows sum (1 Viewer)

endri81

Registered User.
Local time
Today, 12:13
Joined
Jul 5, 2010
Messages
121
Hi,
I have data collected by a query as in attached file.
I need to create a report of city name i.e Berat , PeriodSemiAnnual i.e First 2002 (12002 in the table) and other data by summing rows where the PeriodSemiAnnual is the same.
For example first 2 rows of report should be :

Low Dose Pop Depo IUD Condoms
Berat First 2002 1147 36 133 102 2875
Berat Second 2002 992 20 113 68 7050

Regards
 

Attachments

  • 1.jpg
    1.jpg
    104.6 KB · Views: 96

dpw204

Registered User.
Local time
Today, 12:13
Joined
Aug 19, 2010
Messages
26
A model / prototype may help here. It looks like you are wanting a total for 'Low Dose Pop Depo IUD Condoms', by the period. That should be easy to get with a group-by query which includes the period field, but doesn't include the non-distinct date field.

In the prototype image is a table with four fields
- period - text
- apples - number
- oranges - number
- date - date
============
The query which generates the results grouped by period/quarter is:
Code:
SELECT zCount.Period, Sum(zCount.Apples) AS SumOfApples, Sum(zCount.Oranges) AS SumOfOranges
FROM zCount
GROUP BY zCount.Period;
 

Attachments

  • clip.jpg
    clip.jpg
    37.1 KB · Views: 97

Users who are viewing this thread

Top Bottom