Results 1 to 3 of 3
  1. #1
    razkowski is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jul 2012
    Posts
    16

    Creating a pivot table like query

    Hello all...new to the board. I have a list of transactions (format below) and would like to create a query (or set of queries if necessary) to generate a result that is like an excel pivot table. The data in my table looks like this:

    Transaction Date Net $ Product Number
    7/2/2012 $50 1
    6/15/2012 $35 2
    5/10/2012 $40 3

    Obviously this is an overly simplified version of my data. I'd like the query result to look like this:

    Transaction Date (just year and month) Product 1 (Product Number - with net $ summed) Product 2 (Product Number - with net $ summed) Product 3 (Product Number - with net $ summed)

    2012/05 $0 $0 $40
    2012/06 $0 $35 $0


    2012/07 $50 $0 $0

    Each product can have many sales in a given month, so it's important that the net be totaled by product and month.

    Thank you in advance for any help that can be provided.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    A crosstab should be able to do this.

    Create field in query that calculates the date as year/month then the crosstab will use that value as GroupBy RowHeader. The ProductNumber would be ColumnHeader and Net$ would be the Value field.

    YrMo: Year([Date]) & "/" & Format(Month([Date]),"00")
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    razkowski is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jul 2012
    Posts
    16
    That's the ticket, June7! Thank you very much for your help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 06-29-2012, 01:31 AM
  2. Creating Excel pivot table issue
    By Reaper in forum Import/Export Data
    Replies: 1
    Last Post: 06-14-2012, 12:32 PM
  3. Problem with Query and pivot table
    By winterh in forum Access
    Replies: 1
    Last Post: 04-18-2012, 10:03 AM
  4. Pivot Table from Query to Form
    By polpolpol in forum Forms
    Replies: 0
    Last Post: 03-20-2012, 12:11 PM
  5. Query default to Pivot Table view
    By Theremin_Ohio in forum Access
    Replies: 1
    Last Post: 03-30-2011, 09:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums