DataGraph Forums › Technical Support › Support Desk › Column of averages of other columns
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>
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.
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>
You can also do this in a more spreadsheet like way using the defined “mean” function as shown in this screen shot:
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 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!
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).
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
Thanks everyone for pointing this out.
We will the standard deviation in our next update.
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.
DataGraph Forums › Technical Support › Support Desk › Column of averages of other columns