+ Reply to Thread
Results 1 to 5 of 5

Calculate average column-wise and sum of the same data row-wise in Pivot table

  1. #1
    Registered User
    Join Date
    04-29-2020
    Location
    Nepal
    MS-Off Ver
    Excel 2016
    Posts
    3

    Calculate average column-wise and sum of the same data row-wise in Pivot table

    I have a data that is generate every hour of the day for various entities. When I create the Pivot Table in Excel, by default, it provide the sum of those data for every row (which is the sum of the data for every entity for each hour, and that's what i need row-wise) but column-wise also it adds up (sums up) all the data for each hour, which is not what I want. I want to calculate average, or Max value or Min value for all those hourly generated data for each day (this is stacked column-wise). How to generate average or Max or Min for these data in column while sum for the same data in row? Thanks in advance.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,737

    Re: Calculate average column-wise and sum of the same data row-wise in Pivot table

    a sample sheet would help
    you can goto field settings and change to MAX, MIN, Average, Count -

    see the yellow banner across the top of your thread
    HOW TO ATTACH YOUR SAMPLE WORKBOOK:
    etaf Fast answers need clear examples. Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. Just before posting, scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    04-29-2020
    Location
    Nepal
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Calculate average column-wise and sum of the same data row-wise in Pivot table

    Thanks for looking on the problem. I have attached a sample of my pivot table. You are right that I can change the field settings to MAX, MIN or Average but then the row values also changes to MAX, MIN or Average. In fact, I want row wise it should be left out as sum of data (sum of S1 and s2 in sample file attached) but columnwise it should be either average or MIN or MAX of the data for each day, month or year. I don't want sum of all the hourly values. Thanks once again.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Calculate average column-wise and sum of the same data row-wise in Pivot table

    Maybe you mean like this:

    Add the item Value for the second time in the "VALUE" box.
    For that criteria you use e.g. MIN.

    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    04-29-2020
    Location
    Nepal
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Calculate average column-wise and sum of the same data row-wise in Pivot table

    Thanks for your solution. Yes,it does provide me with the MIN of all the values in the column but I have to create a separate column for that purpose.
    What I want is for every hourly data from S1 and S2, I want to keep the pivot table generated "total sum of value" column which is the sum of each and every hourly
    data from S1 and S2. However, for each column "sum of value" generated by Pivot Table (both for S1 and S2), in each date 01,02 etc I want average, MIN or MAX of hourly data
    and for each month 'March' etc, I want average, MIN or MAX for all the dates of the month (eg March). This way when I create Pivot Chart, when I zoom in I get the
    graph of hourly data of S1 and S2 but when I zoom out, daywise graph which is the sum of hourly data which is not useful, instead daywise graph is informative if it is
    average or MAX or MIN of all the hourly data. For this reason I want average or MIN or MAX of all the hourly data in the column under date (01,02 etc), month (March, April etc)
    . Is there a workaround to get this kind of data? Thanks once again !

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] calculate the duration Month wise ( total days in to period wise )
    By abuharvey in forum Excel General
    Replies: 4
    Last Post: 10-16-2018, 07:33 AM
  2. [SOLVED] need to arrange column wise data to row wise with monthly wise
    By alok.gupta4ever in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-03-2016, 11:11 AM
  3. [SOLVED] Transpose Column wise data into Row wise w.r.t using macro
    By thara.p24 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-21-2015, 05:17 AM
  4. Excel code to represent data from row wise to column wise
    By sreejeshc in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-12-2013, 03:45 AM
  5. [SOLVED] I want change the data row wise to coloum wise & coloumn wise to row wise.
    By satputenandkumar0 in forum Excel General
    Replies: 3
    Last Post: 12-20-2012, 08:34 AM
  6. Replies: 4
    Last Post: 08-01-2012, 09:50 AM
  7. Data row wise, formula column wise
    By Fred Smith in forum Excel General
    Replies: 4
    Last Post: 12-09-2005, 11:55 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1