Results 1 to 6 of 6
  1. #1
    Rudolf14 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    5

    Transposing data in a report

    Hi all,

    I Need help.

    This is the data in my report:



    Area:
    Section:
    Machine:
    Component:
    Date 1
    severity 1
    Date 2
    Severity 2
    Date 3
    severity 3
    .........

    I need to trans pose it to this;

    Area:
    Section:
    Machine:
    Component:
    Date 1 Date 2 Date 3................
    Severity 1 Severity 2 Severity 3...........

    Regards,
    Rudolf

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    Not enough information

    I would expect you would use a crosstab query, however you don't transpose data from a report but from a table and it is not at all clear what your table looks like. At the moment it looks denormalised which means you can't use a crosstab

    A cross tab result would look like

    Area: Section: Machine: Component: Date 1 .....Date 2 .....Date 3................
    A.......25.........digger.....C1..............Seve rity 1.Severity 2.Severity 3...........

    not as you have shown it

    Suggest provide some example data as a table view and clarify what your output is required to look like in a report - your layout is possible but will require the use of subreports

  3. #3
    Rudolf14 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    5
    Hi Ajax,

    My Table looks like the following:

    TblMain

    ID
    Area
    Section
    Machine
    Component
    Date
    Severity
    Workorder
    Finding
    Descrition
    Recommendation

    This specific data is imported from a excel spreadsheet.

    Hope this helps....

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    only a partial answer so suggest use a crosstab query

    sort ascending, group and rowheading for fields Area, Section, Machine, Component
    sort ascending, group and columnheading for date (note date is a reserved word and should not be used as a field name) Also, do not format it if you want to maintain a date order
    max (or min or first or last) and Value for severity - since no data provided or what that is required to look like, that's my best guess

    Also no idea how many dates you are talking about - there is a limit of 255 columns in total

    good luck with your project



  5. #5
    Rudolf14 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    5
    Hi Ajax,

    Thank you,
    I managed to get it to work, My only problem that I have is that my date is a lot of dates, 574 to be exact, how do I limit it to only the last 100 dates?

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    again, insufficient data provided to provide a proper answer, but in principle you would use a criteria something like

    WHERE Date in (SELECT TOP 100 Date FROM myTable T ORDER BY Date Desc)

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

Similar Threads

  1. Transposing columnar data to row data; Export to excel for SPSS
    By jondavidf in forum Import/Export Data
    Replies: 6
    Last Post: 01-25-2019, 06:42 PM
  2. Transposing Linked Data
    By Rustin788 in forum Access
    Replies: 4
    Last Post: 03-09-2017, 03:46 PM
  3. Help! Transposing Data via Cross Tab Query?
    By William McKinley in forum Queries
    Replies: 3
    Last Post: 03-03-2015, 10:45 AM
  4. transposing data in a report
    By brianrunsphilly in forum Reports
    Replies: 3
    Last Post: 10-23-2013, 02:22 PM
  5. Transposing Data
    By NoiCe in forum Queries
    Replies: 0
    Last Post: 11-09-2008, 05:24 PM

Tags for this Thread

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