+ Reply to Thread
Results 1 to 5 of 5

Pivot use Running Total in Calculated Field

  1. #1
    Registered User
    Join Date
    07-06-2009
    Location
    Malta
    MS-Off Ver
    Excel 2016
    Posts
    16

    Pivot use Running Total in Calculated Field

    Hi.

    Iīve attached a sample file where I have some "cohort" data style for a set of customers that became customers back in Jan2018, and their 'Activity month' (1 to 22 so far). Then I have their respective monthly revenue as well as monthly costs. From the revenue and costs I have created two "Running Total in" fields in the pivot to get the cumulative revenue and costs.

    PROBLEM:

    With the running revenue and costs I now want to calculate the "Running life time value" of the customers, as well as the return on investment to see when and if we made our money back at some point from this set of customers. My problem now is that I canīt find a way of actually using the "Running Totals" in the pivot, in a calculated field. Is the pivot really that limited?

    I have made two (yellow headers) columns with the result manually calculated to show what I want to somehow apply in the pivot instead.

    N.B I already thought about altering the source data, but the data will have many markets, business partners etc to eventually filter out, so I donīt see how some "SUMIFS" could do the trick, hence I want to do it straight in the pivot.

    Can anyone come up with a solution to this, or a work around?
    Attached Files Attached Files
    Last edited by trendkill; 11-27-2019 at 09:53 AM.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Pivot use Running Total in Calculated Field

    No attachment?

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

    Also, is your Excel version up to date in your profile - are you still using Excel 2007?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    07-06-2009
    Location
    Malta
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: Pivot use Running Total in Calculated Field

    Attached.

    And I use excel 2016 version
    Attached Files Attached Files

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Pivot use Running Total in Calculated Field

    Load your data to the Data Model (using Power Query), then create your Pivot Table based on the Data Model.

    Now you can create explicit measures, using DAX - in your case, something like these (making a few assumptions on your calculations):

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.


    Note: I think your manually created ROI Running Total is wrong - you're calculating a running total of a running total, for both Revenue and Commission...


    See attached workbook for worked example.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-06-2009
    Location
    Malta
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: Pivot use Running Total in Calculated Field

    Thanks a lot for that.

    My ROI was indeed incorrect, put it together too fast to realize. Sadly power query and DAX is a bridge I so far havenīt crossed. Your solution looks correct indeed, I was just hoping I would be able to re-create it on my own - but I have to learn I guess.

    Thanks 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. Pivot Table: Calculated Field based on Running Total Field
    By EvolvingMonkey in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-07-2016, 06:27 AM
  2. Replies: 0
    Last Post: 08-15-2016, 02:07 PM
  3. running total calculated field
    By aborg88 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-23-2014, 07:23 PM
  4. Replies: 0
    Last Post: 10-24-2013, 10:59 AM
  5. Replies: 1
    Last Post: 12-10-2012, 05:41 AM
  6. Replies: 0
    Last Post: 03-21-2008, 04:35 PM
  7. [SOLVED] Using '% of Total' in calculated field in Pivot Table
    By goofy11 in forum Excel General
    Replies: 2
    Last Post: 05-09-2006, 06:35 PM

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