Build report in Access

I have a query that lists the weekly totals for 3 offices. It is grouped by the week number Week: Format([Bookings.DateRecorded],"ww".

The resulting query looks something like this:

Week           Office            Office Weekly Total
5                  Office A               500
5                  Office B                750
5                  Office C                 600
6                  Office A               100
6                  Office B                300
6                  Office C                 400

The end result I would like to be a report with Week number in Column 1. Office A week total is Column 2. Office B week total in Column 3.

Something like this:

Week           Office A Week Total               Office B Week Total              Office C Week Total
5                             500                                                  750                                         600
6                              100                                                 300                                          400

Now that I write this, I think I have to change the query, not the report. The query is a 3 column query. Week, Office (which is grouped) then Total (which is sum). How do I add more columns to the query to it only adds Office A, then column for Office B.

Hope I am making sense. THanks!
cansevinAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
try using the Crosstab Query wizard

create > query wizard > Crosstab Query wizard
0
cansevinAuthor Commented:
I think I need help with a sumif column in my query. Basically Column 3 would be Sumif the fieild Office.[Customer Info Table] is "Office A".

Just not sure how to write that Sumif. The field is Office from Customer Info Table. The sum field is Exteneded Price from Booking Details Extended.

Thanks!
0
Rey Obrero (Capricorn1)Commented:
do you mean like this

SELECT yourQuery.Week, Sum(IIf([Office]="Office A",[Office Weekly Total],0)) AS [Office A Week Total], Sum(IIf([Office]="Office B",[Office Weekly Total],0)) AS [Office B Week Total], Sum(IIf([Office]="Office C",[Office Weekly Total],0)) AS [Office C Week Total]
FROM yourQuery
GROUP BY yourQuery.Week
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.