+ Reply to Thread
Results 1 to 5 of 5

Need Calculated Field for each month column

  1. #1
    Forum Contributor
    Join Date
    08-31-2021
    Location
    Kassel, Germany
    MS-Off Ver
    365 v2308
    Posts
    187

    Need Calculated Field for each month column

    Hi all,

    I have a pivot table with 2 columns of data per row. I'd like to replace the 2 columns with a single column that totals the 2 columns. I've tried using Calculated Fields, but they're not totalling correctly. The first Calculated Field, called Test, returns all zeroes. The second Calculated Field, Test2, returns all 2's. In the attached file, starting col.I you can see 1. Current Pivot Table, with the 2 Calculated Fields not working. 2. Possible Output is a mockup of how the monthly totals should look, and 3. Desired Output is what I'm trying to get to in order to produce a chart. Any suggestions appreciated. TIA...
    Attached Files Attached Files

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,274

    Re: Need Calculated Field for each month column

    Since it looks like you always have either Car or Van/4x4 for each row, remove all the value fields you have currently and just add one of the other fields like Name, which will count by default. (Calculated fields always Sum, so you'd need to load your data to the data model and use measures otherwise).
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Need Calculated Field for each month column

    A small adjustment to your data layout solves the problem
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    08-31-2021
    Location
    Kassel, Germany
    MS-Off Ver
    365 v2308
    Posts
    187

    Re: Need Calculated Field for each month column

    Quote Originally Posted by rorya View Post
    Since it looks like you always have either Car or Van/4x4 for each row, remove all the value fields you have currently and just add one of the other fields like Name, which will count by default. (Calculated fields always Sum, so you'd need to load your data to the data model and use measures otherwise).
    That's perfect, thanks rorya.

  5. #5
    Forum Contributor
    Join Date
    08-31-2021
    Location
    Kassel, Germany
    MS-Off Ver
    365 v2308
    Posts
    187

    Re: Need Calculated Field for each month column

    Quote Originally Posted by Pepe Le Mokko View Post
    A small adjustment to your data layout solves the problem
    Thanks Pepe Le Mokko, but that's not quite the solution I'm looking for. I just want the total figures for the month, not the figures for Car or Van/4x4. I'm a little embarrassed at how simple the solution was, as suggested by rorya.

+ 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. Replies: 6
    Last Post: 04-04-2019, 12:33 PM
  2. difference between calculated field and calculated column in PowerpIvot
    By stephme55 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-14-2016, 06:05 PM
  3. Calculated Field - Each month variance from opening
    By MoeIndustries in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 02-06-2014, 09:22 AM
  4. [SOLVED] Referring to a Sub-Field on Calculated Field Pivot Table Column?
    By figo12 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-27-2014, 02:02 PM
  5. Replies: 0
    Last Post: 10-24-2013, 10:59 AM
  6. Replies: 0
    Last Post: 11-02-2012, 08:37 AM
  7. Replies: 0
    Last Post: 06-23-2011, 11:58 AM

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