Column of averages of other columns

DataGraph Forums Technical Support Support Desk Column of averages of other columns

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #8456
    oddball
    Participant

      Hi,

      I have a dataset with several columns of measurements. I would like to plot the average of each of these columns on graph. Is there a way to create a column which lists the averages of other columns? The only way I’ve found to do this is to manually create this column by punching in the averages one by one. Seems like it should be a simple thing to do, maybe I’m overlooking something.

      Thanks
      <div id=”accel-snackbar” style=”left: 50%; transform: translate(-50%, 0px); top: 50px;”></div>

      #8458
      ckress
      Participant

        Do you mean creating a new column containing for each row the average of the row values of the other columns? I was looking for that as well, couldn’t find it, so finally created a expression column calculating the sum of other columns divided by their number (all manually entered, luckily not many columns). There must be another solution for this simple thing indeed.

        If it is the average of average of all rows from other columns (calculated by a command for each column), I’m interested by how to do it as well.

        I’m pretty sure all that can be done using the pivot command and redirecting the results to a new colomn.

        • This reply was modified 2 years, 9 months ago by ckress.
        • This reply was modified 2 years, 9 months ago by ckress.
        • This reply was modified 2 years, 9 months ago by ckress.
        • This reply was modified 2 years, 9 months ago by ckress.
        #8463
        oddball
        Participant

          Solved this through pivot command as suggested. Had to manually flatten my data for some reason but now it works and automatically updates if I change my data. Thanks!
          <div id=”accel-snackbar” style=”left: 50%; transform: translate(-50%, 0px); top: 50px;”></div>

          • This reply was modified 2 years, 9 months ago by oddball.
          #8465
          jordan
          Participant

            You can also do this in a more spreadsheet like way using the defined “mean” function as shown in this screen shot:Screen Shot 2022-02-28 at 9.26.03 PM

            Be aware that there is not a standard deviation function defined, so if you would like that statistic, you will need to use the pivot command. I think that in a future version a defined stdev function would be very useful , and that function would be sufficient for many users.

             

            Jordan

             

            • This reply was modified 2 years, 8 months ago by jordan. Reason: terminology
            #8467
            ckress
            Participant

              This is what I tried first but it didn’t work, now I realize it was because I made a mistake somewhere else. Thanks for the correction!

              #8511
              pharmpk
              Participant

                I used mean(Column1,Column2,Column3) for the mean but standard deviation wasn’t as easy. I used sqrt(((MeanV-Column1)^2+(MeanV-Column2)^2+(MeanV-Column3)^2)/2).

                Example

                • This reply was modified 2 years, 8 months ago by pharmpk.
                #8515
                jordan
                Participant

                  Yep, that is another way to do it, but hand jamming those equations is cumbersome and a little mistake prone. Not a problem, it does work, just have to take care you get all the parenthesis in proper place.

                  jordan

                  #8516
                  dgteam
                  Moderator

                    Thanks everyone for pointing this out.

                    We will the standard deviation in our next update.

                    #8517
                    pharmpk
                    Participant

                      Maybe also an easy way to include any number(n) of columns. I just tried defining a group of columns in the mean(group) calculation but it didn’t seem to work.

                    Viewing 9 posts - 1 through 9 (of 9 total)
                    • You must be logged in to reply to this topic.

                    DataGraph Forums Technical Support Support Desk Column of averages of other columns