Multiple values in a crosstab query

Hello Experts,

I am trying to figure out if a crosstab query in Access 2007 can have more than one value.  What I am trying to do is list all of our products sold for the month as a row heading, list all our locations as column headings and then show the number of units sold as one value, and then the total sales generated by those units sold as the second value.

Any help is appreciated.

Thanks,

JJ


JJINFMAsked:
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:
did you try using the Crosstab query wizard?
0
JJINFMAuthor Commented:
I did and I can only select one value when is asks for the number to be calcuated at the row and column intersection.  If I try to modify the query by adding a second value it tells me that I can use only one value option.
0
Rey Obrero (Capricorn1)Commented:
can you upload a copy of your db?
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

JJINFMAuthor Commented:
OK, here is the table that I am basing the query on and a query that I created with the crosstab wizard,
 
Thanks JJ

Database1.accdb
0
GRayLCommented:
32.4 MB is a bit big - when did you last do a compact & repair?  You should always do a C & R before uploading.
0
GRayLCommented:
A lot of us in this forum do not use A2007.  Anyway you can copy the db over to an A2003 mdb?
0
JJINFMAuthor Commented:
OK, try this one.
 
 

Database2.mdb
0
GRayLCommented:
Run this query:

TRANSFORM Format(Sum(pmix_sales.Count),"0000") & " - " & Format(Sum(Sales),"$#,000.00") AS SumOfCount
SELECT pmix_sales.ItemNbr, Sum(pmix_sales.Count) AS [Total Of Count]
FROM pmix_sales
GROUP BY pmix_sales.ItemNbr
PIVOT Space(8) & pmix_sales.Store & Space(8);
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
GRayLCommented:
Thanks glad to help.  BTW you might as well remove the Space(8) before and after the PIVOT field - it is ignored by Jet - I was just trying to get the fields of the Cross tab set a bit wider.
0
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.