Results 1 to 5 of 5
  1. #1
    patchesohouli is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2016
    Posts
    17

    Converting Row-Based Data to Column-Based

    Hi,



    I am trying to utilize Access to take weekly data in a Row-based format and transpose to Column based. So for example, I have the following row-based report of employee benefits:

    EEID Last Name Benefit Plan Deduction Amount
    1234 Smith Medical $2
    1234 Smith Dental $4
    2245 Doe Vision $3
    2245 Doe Medical $2


    These values will change each week, employees will have some but not all possible benefits (there will need to be blank values where an employee is not enrolled). I need to import weekly changes into access and have the report come out as such:

    EEID Last Name Medical Dental Vision
    1234 Smith $2 $4
    2245 Doe $2 $3


    Can this be done? Thanks in advance for your help.

  2. #2
    Minty is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,158
    Yes Create a Cross tab query, use the query designer, and all will become clear (after a bit of fiddling).
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 10 Access 2016
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    You could also export the data to Excel and then Transpose the table

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    This is similar to a cross tab query... I didn't know about cross tab queries at the time (long, long ago) I needed to create a report, so I created this type of query.
    Note that there is no date/time filter for the query. But it could/should be added.

    Also note that you should not have spaces in object names (especially in field names).
    Attached Files Attached Files

  5. #5
    patchesohouli is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2016
    Posts
    17
    Wow - thank you everyone. I think I got it using the crosstab query. Ssanfu, I am going to dissect your query however as I think I have other uses for it!

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

Similar Threads

  1. Replies: 2
    Last Post: 05-15-2018, 08:20 AM
  2. Replies: 2
    Last Post: 01-04-2018, 12:01 AM
  3. Replies: 4
    Last Post: 11-29-2017, 10:01 AM
  4. Replies: 3
    Last Post: 07-06-2016, 09:48 AM
  5. Replies: 4
    Last Post: 12-29-2015, 03:25 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