+ Reply to Thread
Results 1 to 10 of 10

Running 12 month total with variable date periods

  1. #1
    Registered User
    Join Date
    12-16-2022
    Location
    Auckland, New Zealand
    MS-Off Ver
    365
    Posts
    5

    Running 12 month total with variable date periods

    Hi All

    I am trying to get a formula that does a running 12 month total for a series of date periods (up to 6 years so could include periods during a leap year).


    Period Ending Value per period Running 12 month total
    01/01/2020 1 1
    08/01/2020 3 4
    15/01/2020 5 9
    16/01/2020 22 31
    29/01/2020 1 32

    As we reach a period ending date of 02/01/2021 then the period ending 01/01/2020 would drop out of the running 12 month total
    The running 12 month total needs to be calculated for each period ending date.

    Also exactly the same as above but also for a 52 week period

    Many thanks in advance
    Attached Files Attached Files
    Last edited by JohnB1; 12-16-2022 at 07:45 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,165

    Re: Running 12 month total with variable date periods

    Hi John and welcome to the forum,

    There is a "Running Total" available in Pivot Tables. See the attached to see if that is what you need.
    12 month running total PT.xlsx
    There are many sites that help with this topic. Here is but one at:
    https://www.pivot-table.com/2013/07/...%20next%20year.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,313

    Re: Running 12 month total with variable date periods

    See if this does what you want.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Looks ok apart from the last few dates. Can you check your calculations.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    12-16-2022
    Location
    Auckland, New Zealand
    MS-Off Ver
    365
    Posts
    5

    Re: Running 12 month total with variable date periods

    Hi TMS

    Works fine in the first year but after that as you say - gives a different answer
    For period ending 06/01/21 - it needs to sum from PE 08/01/20 - 06/01/21 = 80
    For Period ending 13/01/21 - it needs to sum from PE 15/01/20 - 13/01/21 = 79
    For period ending 20/01/21 - it needs to sum from PE 29/01/20 - 20/01/21 = 54

  5. #5
    Registered User
    Join Date
    12-16-2022
    Location
    Auckland, New Zealand
    MS-Off Ver
    365
    Posts
    5

    Re: Running 12 month total with variable date periods

    Hi Marvin
    Thanks for your prompt reply
    Unfortunately the 2 options I see under there either reset each 12 months or continue with just adding up a total continuously
    After each period end date, I need the total for the sum of the previous 12 months for any dates that fall between that period
    eg
    For period ending 06/01/21 - it needs to sum from PE 08/01/20 - 06/01/21 = 80
    For Period ending 13/01/21 - it needs to sum from PE 15/01/20 - 13/01/21 = 79
    For period ending 20/01/21 - it needs to sum from PE 29/01/20 - 20/01/21 = 54
    Hope this clarifies it a bit better
    Any suggestions really appreciated
    Thanks
    John

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,313

    Re: Running 12 month total with variable date periods

    Ok, try this one:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,390

    Re: Running 12 month total with variable date periods

    Or try this one in C2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    12-16-2022
    Location
    Auckland, New Zealand
    MS-Off Ver
    365
    Posts
    5

    Re: Running 12 month total with variable date periods

    Thanks Hans

    Works Well - also need to do the same thing but going back 52 calendar weeks - any suggestions?

  9. #9
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,390

    Re: Running 12 month total with variable date periods

    Please try in C2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by HansDouwe; 12-17-2022 at 10:14 PM.

  10. #10
    Registered User
    Join Date
    12-16-2022
    Location
    Auckland, New Zealand
    MS-Off Ver
    365
    Posts
    5

    Re: Running 12 month total with variable date periods

    Excellent thanks very much Hans. Works perfectly

+ 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] DAX Datesbetween to create month by month running total
    By Dicken in forum Office 365
    Replies: 1
    Last Post: 07-30-2022, 11:05 AM
  2. creating running total with inconsistent periods
    By tgreenfield88 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-27-2020, 12:11 PM
  3. Replies: 1
    Last Post: 02-28-2020, 04:15 AM
  4. Need a formula to calculate running anticipated total for a Month to Date report
    By GreyedOutJedi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-16-2016, 06:02 PM
  5. Display date when running total met
    By RangerCorbijn in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-01-2014, 12:01 PM
  6. Provide Month based on Running Total
    By zannnn in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-08-2012, 12:16 PM
  7. Summation of latest running 3 month total
    By tweety26 in forum Excel General
    Replies: 3
    Last Post: 07-19-2007, 12:13 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