I have a table called “tblStaticAllFo recast”, below are the fields I am currently focusing on within the table:
LOB [this is my product list that has 22 products; text]
GWP [Gross Written Premium; numeric]
FWeek [Drop down list of numbers 1-5; numeric]
Any given LOB can have a GWP and FWEEK assigned to it. For example:
LOB---------GWP----------FWeek
Trains------1,506---------------1
Trains------1,888---------------2
Trains------2,056---------------1
Cars--------1,577---------------1
Cars--------2,999---------------1
Cars--------1,999---------------2
Cars--------3,999---------------1
etc...
What I am trying to do is create a report that shows all LOB’s (Products) GWP (Amount) for that give FWeek (Week).
I thought the best way of doing this was to write a crosstab query using Access’s query builder, but of course I never did this before. Below is what I currently got to work: “SQL design view”:
Expand|Select|Wrap|Line Numbers
- TRANSFORM Nz(Sum([tblStaticAllForecast].[GWP]),"0") AS GWP
- SELECT tblStaticAllForecast.LOB
- FROM tblStaticAllForecast
- GROUP BY tblStaticAllForecast.LOB
- PIVOT tblStaticAllForecast.FWeek;
Any ideas would be great.
Thanks,
Keith.