Averaging many columns

DataGraph Forums Technical Support Support Desk Averaging many columns

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4669
    sandrift
    Participant

      I’ve been hunting through the PDF manual and the online support and can’t find anything that looks like what I want to do, so here I am.

      I work with datasets that have a common x-axis, but many, many columns of y values, which I plot individually, but I also want to show the average of the y-values.  I know I can average columns using an expression column, but once you’ve got more than a few columns to average, this becomes exceedingly cumbersome to enter manually, particularly if the column titles are not simple (and redirecting column titles also becomes cumbersome).  Is there some other way to accomplish this that I’ve failed to find?   Thanks.

      #4671
      dgteam
      Moderator

        There is no other way to average across rows than what it sounds like you are already doing.

        In general, the program works best with less columns and more rows.  That is referred to as a long format rather than a wide format. To get convert to a wide format, columns can be ‘Flatten’ to a long format.

        The long format gives you the most flexibility in terms of being able to calculate a mean by grouping using x or y, both, or some other category using the Pivot command.

        Here is an article describing this approach:

        How to Flatten Data

        Data can then be extracted from a the Pivot command to view columns of data.  Or use the commands you have and add a mask.  If your are used to the wide format, this may take some adjustment but it will give you a lot more flexibility.

        If you are not sure how to use the Pivot, we can help with that.

         

        #4674
        sandrift
        Participant

          Thanks — I did try flattening the data and did not get a result that was useful, but I’m not very familiar with the Pivot command and may not have done it correctly.  I can post an example file here, or contact you offline, just let me know what’s best.

          #4675
          dgteam
          Moderator

            Please email the file to help@visualdatatools.com and we will take a look!

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

          DataGraph Forums Technical Support Support Desk Averaging many columns