• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 982
  • Last Modified:

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


0
JJINFM
Asked:
JJINFM
  • 4
  • 3
  • 2
1 Solution
 
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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now