Transpose a Report

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JayDawg

    #1

    Transpose a Report

    Excel has this cool little function where you can copy data, and then
    paste it transposed so that which runs across the rows now runs down a
    colum and visa versa. Is there a way in access to create a report that
    would transpose the data from what is logical.

    I have a query that has a field for the date (by month) and then
    additional fields (15 of them) by which I enter in data. So in the
    Table/Query it is formated such that when the data is entered you would
    go across the row and enter in the date, and then enter in the
    respective value for each of the fields your under.

    I need to create a report that would allow me to show the date across
    the top and the other fields running down the left with the values
    under each date, such as a spreadsheet or cross tab query would do. As
    you can see though from what I have explained a cross tab query will
    not work, or at least I dont think it would becuase I would have to set
    the dates as my column headings, all the other fields as my Row
    Hadings, and am left with nothing for the value, because all the values
    are actually associated with the row headings.

    I hope this made sense and I hope someone can help because I am stumped.

  • Bob Quintal

    #2
    Re: Transpose a Report

    "JayDawg" <hebgbe27@cox.n et> wrote in
    news:1151108367 .039807.54560@b 68g2000cwa.goog legroups.com:
    [color=blue]
    > Excel has this cool little function where you can copy data,
    > and then paste it transposed so that which runs across the
    > rows now runs down a colum and visa versa. Is there a way in
    > access to create a report that would transpose the data from
    > what is logical.
    >
    > I have a query that has a field for the date (by month) and
    > then additional fields (15 of them) by which I enter in data.
    > So in the Table/Query it is formated such that when the data
    > is entered you would go across the row and enter in the date,
    > and then enter in the respective value for each of the fields
    > your under.
    >
    > I need to create a report that would allow me to show the date
    > across the top and the other fields running down the left with
    > the values under each date, such as a spreadsheet or cross tab
    > query would do. As you can see though from what I have
    > explained a cross tab query will not work, or at least I dont
    > think it would becuase I would have to set the dates as my
    > column headings, all the other fields as my Row Hadings, and
    > am left with nothing for the value, because all the values are
    > actually associated with the row headings.
    >
    > I hope this made sense and I hope someone can help because I
    > am stumped.
    >[/color]

    It doesnt make sense because even in Excel, you have only 1 cell
    at the intersection of the row and column. So you would crosstab
    the date to 14 of your 15 fields as row headings and use the
    15th as the value

    If you showed us some actual data it might be easier to
    understand.


    --
    Bob Quintal

    PA is y I've altered my email address.

    --
    Posted via a free Usenet account from http://www.teranews.com

    Comment

    • JayDawg

      #3
      Re: Transpose a Report

      I just signed up for this yesterday and am still a novice, how can I
      show you the data?

      Bob Quintal wrote:[color=blue]
      > "JayDawg" <hebgbe27@cox.n et> wrote in
      > news:1151108367 .039807.54560@b 68g2000cwa.goog legroups.com:
      >[color=green]
      > > Excel has this cool little function where you can copy data,
      > > and then paste it transposed so that which runs across the
      > > rows now runs down a colum and visa versa. Is there a way in
      > > access to create a report that would transpose the data from
      > > what is logical.
      > >
      > > I have a query that has a field for the date (by month) and
      > > then additional fields (15 of them) by which I enter in data.
      > > So in the Table/Query it is formated such that when the data
      > > is entered you would go across the row and enter in the date,
      > > and then enter in the respective value for each of the fields
      > > your under.
      > >
      > > I need to create a report that would allow me to show the date
      > > across the top and the other fields running down the left with
      > > the values under each date, such as a spreadsheet or cross tab
      > > query would do. As you can see though from what I have
      > > explained a cross tab query will not work, or at least I dont
      > > think it would becuase I would have to set the dates as my
      > > column headings, all the other fields as my Row Hadings, and
      > > am left with nothing for the value, because all the values are
      > > actually associated with the row headings.
      > >
      > > I hope this made sense and I hope someone can help because I
      > > am stumped.
      > >[/color]
      >
      > It doesnt make sense because even in Excel, you have only 1 cell
      > at the intersection of the row and column. So you would crosstab
      > the date to 14 of your 15 fields as row headings and use the
      > 15th as the value
      >
      > If you showed us some actual data it might be easier to
      > understand.
      >
      >
      > --
      > Bob Quintal
      >
      > PA is y I've altered my email address.
      >
      > --
      > Posted via a free Usenet account from http://www.teranews.com[/color]

      Comment

      • JayDawg

        #4
        Re: Transpose a Report

        Date By Month Sum Of PED Visits Sum Of PED AMA Sum Of PED
        Elopes
        Jan - 06 2577 54
        2
        Feb - 06 2894
        60 5

        Above is a representation of a few of the fields there are about ten
        more Summary fileds from the query. Imagine thenext record would be
        Mar - 06, Apr - 06, etc. each with its own values for the fields. What
        I need in the report is to have the fields running down the left side
        of the report, with the months running left to right on the top and the
        data being in the data field of the report as it is here.



        JayDawg wrote:[color=blue]
        > I just signed up for this yesterday and am still a novice, how can I
        > show you the data?
        >
        > Bob Quintal wrote:[color=green]
        > > "JayDawg" <hebgbe27@cox.n et> wrote in
        > > news:1151108367 .039807.54560@b 68g2000cwa.goog legroups.com:
        > >[color=darkred]
        > > > Excel has this cool little function where you can copy data,
        > > > and then paste it transposed so that which runs across the
        > > > rows now runs down a colum and visa versa. Is there a way in
        > > > access to create a report that would transpose the data from
        > > > what is logical.
        > > >
        > > > I have a query that has a field for the date (by month) and
        > > > then additional fields (15 of them) by which I enter in data.
        > > > So in the Table/Query it is formated such that when the data
        > > > is entered you would go across the row and enter in the date,
        > > > and then enter in the respective value for each of the fields
        > > > your under.
        > > >
        > > > I need to create a report that would allow me to show the date
        > > > across the top and the other fields running down the left with
        > > > the values under each date, such as a spreadsheet or cross tab
        > > > query would do. As you can see though from what I have
        > > > explained a cross tab query will not work, or at least I dont
        > > > think it would becuase I would have to set the dates as my
        > > > column headings, all the other fields as my Row Hadings, and
        > > > am left with nothing for the value, because all the values are
        > > > actually associated with the row headings.
        > > >
        > > > I hope this made sense and I hope someone can help because I
        > > > am stumped.
        > > >[/color]
        > >
        > > It doesnt make sense because even in Excel, you have only 1 cell
        > > at the intersection of the row and column. So you would crosstab
        > > the date to 14 of your 15 fields as row headings and use the
        > > 15th as the value
        > >
        > > If you showed us some actual data it might be easier to
        > > understand.
        > >
        > >
        > > --
        > > Bob Quintal
        > >
        > > PA is y I've altered my email address.
        > >
        > > --
        > > Posted via a free Usenet account from http://www.teranews.com[/color][/color]

        Comment

        • Bob Quintal

          #5
          Re: Transpose a Report

          "JayDawg" <hebgbe27@cox.n et> wrote in
          news:1151121065 .969084.41570@r 2g2000cwb.googl egroups.com:

          Month Visits AMA lopes
          Jan - 06 2577 54 2
          Feb - 06 2894 60 5[color=blue]
          >
          > Above is a representation of a few of the fields there are
          > about ten more Summary fileds from the query. Imagine thenext
          > record would be Mar - 06, Apr - 06, etc. each with its own
          > values for the fields. What I need in the report is to have
          > the fields running down the left side of the report, with the
          > months running left to right on the top and the data being in
          > the data field of the report as it is here.
          >[/color]
          The hard part for you is going to be getting the data in the
          proper format for a crosstab to work. Lets take a step back for
          a second and examine how the data should have been stored, and
          how we can query it to set it up right.

          Ideally, the data should be in a table with three fields
          Date, Fieldname, value.
          Jan 06 PED Visits 2577
          Jan 06 PED AMA 54
          Jan 06 PED Elopes 2
          Feb 06 PED Visits 2894
          Feb 06 PED AMA 60
          Feb 06 PED Elopes 5
          ....

          If your source table is set up properly, it would be set up
          something like this
          Date, PED type, data, other data, more data, quantity
          and each PED Type has become one of your fields, you are easily
          on the way, just make a crosstab query directly from the table


          Otherwise to get the crosstab you'll need to set up a query like
          this:

          SELECT Month,"PED_Visi ts" as fieldname, [SumOfPED VISITS] as
          value from Query
          UNION SELECT Month,"PED_AMA" as fieldname, [SumOfPED AMA] as
          value from Query
          UNION SELECT Month,"PED_Elop es" as fieldname, [SumOfPED VISITS]
          as value from Query

          and on down for your 15 fields, then build the crosstab query
          from that query.

          --
          Bob Quintal

          PA is y I've altered my email address.

          --
          Posted via a free Usenet account from http://www.teranews.com

          Comment

          • JayDawg

            #6
            Re: Transpose a Report

            Thanks for the info Bob I will have to try the union query, I guess I
            failed to share with you that the original table has additional fields
            that are used for other reports. There is actually 24 records for each
            day of the month as the date is tracked hourly. What I have here is
            data that is summarized by grouping the dates by month.

            Bob Quintal wrote:[color=blue]
            > "JayDawg" <hebgbe27@cox.n et> wrote in
            > news:1151121065 .969084.41570@r 2g2000cwb.googl egroups.com:
            >
            > Month Visits AMA lopes
            > Jan - 06 2577 54 2
            > Feb - 06 2894 60 5[color=green]
            > >
            > > Above is a representation of a few of the fields there are
            > > about ten more Summary fileds from the query. Imagine thenext
            > > record would be Mar - 06, Apr - 06, etc. each with its own
            > > values for the fields. What I need in the report is to have
            > > the fields running down the left side of the report, with the
            > > months running left to right on the top and the data being in
            > > the data field of the report as it is here.
            > >[/color]
            > The hard part for you is going to be getting the data in the
            > proper format for a crosstab to work. Lets take a step back for
            > a second and examine how the data should have been stored, and
            > how we can query it to set it up right.
            >
            > Ideally, the data should be in a table with three fields
            > Date, Fieldname, value.
            > Jan 06 PED Visits 2577
            > Jan 06 PED AMA 54
            > Jan 06 PED Elopes 2
            > Feb 06 PED Visits 2894
            > Feb 06 PED AMA 60
            > Feb 06 PED Elopes 5
            > ...
            >
            > If your source table is set up properly, it would be set up
            > something like this
            > Date, PED type, data, other data, more data, quantity
            > and each PED Type has become one of your fields, you are easily
            > on the way, just make a crosstab query directly from the table
            >
            >
            > Otherwise to get the crosstab you'll need to set up a query like
            > this:
            >
            > SELECT Month,"PED_Visi ts" as fieldname, [SumOfPED VISITS] as
            > value from Query
            > UNION SELECT Month,"PED_AMA" as fieldname, [SumOfPED AMA] as
            > value from Query
            > UNION SELECT Month,"PED_Elop es" as fieldname, [SumOfPED VISITS]
            > as value from Query
            >
            > and on down for your 15 fields, then build the crosstab query
            > from that query.
            >
            > --
            > Bob Quintal
            >
            > PA is y I've altered my email address.
            >
            > --
            > Posted via a free Usenet account from http://www.teranews.com[/color]

            Comment

            • polite person

              #7
              Re: Transpose a Report

              On 23 Jun 2006 17:19:27 -0700, "JayDawg" <hebgbe27@cox.n et> wrote:
              [color=blue]
              >Excel has this cool little function where you can copy data, and then
              >paste it transposed so that which runs across the rows now runs down a
              >colum and visa versa. Is there a way in access to create a report that
              >would transpose the data from what is logical.
              >
              >I have a query that has a field for the date (by month) and then
              >additional fields (15 of them) by which I enter in data. So in the
              >Table/Query it is formated such that when the data is entered you would
              >go across the row and enter in the date, and then enter in the
              >respective value for each of the fields your under.
              >
              >I need to create a report that would allow me to show the date across
              >the top and the other fields running down the left with the values
              >under each date, such as a spreadsheet or cross tab query would do. As
              >you can see though from what I have explained a cross tab query will
              >not work, or at least I dont think it would becuase I would have to set
              >the dates as my column headings, all the other fields as my Row
              >Hadings, and am left with nothing for the value, because all the values
              >are actually associated with the row headings.
              >
              >I hope this made sense and I hope someone can help because I am stumped.[/color]

              Take a look at
              Microsoft Support is here to help you with Microsoft products. Find how-to articles, videos, and training for Microsoft Copilot, Microsoft 365, Windows 11, Surface, and more.

              HOW TO: Transpose Data in a Table or Query in Access 2000

              Comment

              Working...