Results 1 to 3 of 3
  1. #1
    ace1259 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    2

    Query to transpose Data in Columns to Rows

    Hi all,

    I'm looking to make a pie chart in an Access report and this can only be down when the data is in a single row. I have a query that gives me the following:



    Store1 Store2
    500 1,000

    and need a table or query so the data reflects:

    Store Sales

    Store1 500
    Store2 1,000

    Any suggestions would be appreciated!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What is the source table data structure? Is it the same as the query example? How many stores are there?

    Requires a UNION query. There is no query designer or wizard for UNION, must type into the SQL view editor of query designer. There is a limit of 50 lines in a UNION. The UNION query essentially rearranges the data into a normalized structure.

    SELECT ALL "Store1" As Store, Store1 As Sales FROM tablename
    UNION SELECT ALL "Store2", Store2 FROM tablename;
    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
    ace1259 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    2
    Worked Great! Thanks much, I tried for the longest time to get the Union query to work on this and couldn't get it to work. Thanks!!!

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

Similar Threads

  1. Replies: 5
    Last Post: 03-29-2012, 09:21 PM
  2. Transpose data in MS Access
    By JBLoafer in forum Access
    Replies: 12
    Last Post: 03-05-2012, 02:45 PM
  3. Export Query to Specific Sheet and Rows/Columns
    By chewbears in forum Queries
    Replies: 7
    Last Post: 11-30-2011, 09:44 AM
  4. Showing Columns & Rows in Crosstab query
    By coach32 in forum Queries
    Replies: 6
    Last Post: 09-11-2011, 07:01 PM
  5. Replies: 1
    Last Post: 01-24-2011, 03:03 PM

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