View Full Version : Nasty query (managers eh?)


polgara
04-22-2003, 03:44 AM
After developing my database for one specific reporting requirement I've now been asked to produce a series of reports all following the same basic structure, but I'm struggling to make sense of it (maybe I'm just too close to the old reports).

Simplistic version of main table (tbl_DeptSales)

Dept: 1,2,3,4 etc
Quarter: 02/03 Q1, 02/03 Q2. 02/03 Q3, 02/03 Q4 etc
Sales: a, b, c ,d etc

Now I've been asked to produce a report of percentage sales increases based on Q1 of each year, ie

Q2 Sales for Q2/Sales for Q1

Any advice?

Narked Pol

Pat Hartman
04-23-2003, 09:47 PM
Use a crosstab query to get all the quarters for a year into the same row. Then calculate the pcnt change in a report.