+ Reply to Thread
Results 1 to 12 of 12

Totaling Months and Years from a Date Range

  1. #1
    Registered User
    Join Date
    01-22-2015
    Location
    Whitby
    MS-Off Ver
    2016
    Posts
    27

    Totaling Months and Years from a Date Range

    Hi folks,

    I was hoping for some help. I am tallying raw data up on one tab and using a 2nd tab to calculate the occurrences of each month of each year (I've attached a file with mock data and desired outcomes). I ultimately want to create a pivot table/chart showing the average number of occurrences from month to month of each year and for each month from one year to the next (i.e. compare January 2015 to January of 2016, 2017 etc.). Any chance someone's either run into this type of situation before or can bail me out?
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2016
    Location
    NY
    MS-Off Ver
    2010
    Posts
    459

    Re: Totaling Months and Years from a Date Range

    I did something kind of quickly....check out attachment. See if it helps or gives you ideas. GIVE Credit if I helped you ( use ADD REPUTATION star). thx

    I put YEAR & Month into more manageable set up form me at least...then you can: 1. Get Counts by month & 2. compare YEARS with Months. It's easier to work with data in similar setups, then the Pivot table does the work! Cheers!

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Totaling Months and Years from a Date Range

    Maybe this one with OLAP formulas because Calculated field is not accessible with DataModel.
    but before everything dates from column A should be converted to Excel Dates
    Attached Files Attached Files
    Last edited by sandy666; 06-21-2017 at 06:25 PM.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Totaling Months and Years from a Date Range

    Here is Pivot Table with Average

  5. #5
    Registered User
    Join Date
    01-22-2015
    Location
    Whitby
    MS-Off Ver
    2016
    Posts
    27

    Re: Totaling Months and Years from a Date Range

    That's awesome and it works well, relative to what I want to achieve - I really appreciate it. I'm trying to understand the formula but can't seem to wrap my head around it. I need to evolve the report to include other data, so I would love to better understand the "CUBE" functions as I have never used them before.

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Totaling Months and Years from a Date Range

    I think easier will be with the file from post #4

  7. #7
    Registered User
    Join Date
    01-22-2015
    Location
    Whitby
    MS-Off Ver
    2016
    Posts
    27

    Re: Totaling Months and Years from a Date Range

    I think you may be right. Could you please tell me how you formulated the fx measure 1 field in order to establish the average? I need to replicate it but I don't know how it was done

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Totaling Months and Years from a Date Range

    Click on PT then go to the ribbon and select PowerPivot, then Measures, Manage Measures, Edit and you will see formula: =[Count of DATE]/[Distinct Count of DATE]

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  9. #9
    Registered User
    Join Date
    01-22-2015
    Location
    Whitby
    MS-Off Ver
    2016
    Posts
    27

    Re: Totaling Months and Years from a Date Range

    I'm running Excel 2016 and my understanding is that PowerPivot is already built in (I don't see the option for it anywhere). Am I doing something wrong? The =[Count of DATE]/[Distinct Count of DATE] formula works really well for what I'm trying to achieve, but I can't seem to replicate it.

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Totaling Months and Years from a Date Range


    I don't understand
    Ex2k16 has PP built-in and all options are there

    btw. You said problem is solved so mark thread as SOLVED, ok?

    ppmeasure.jpg
    Last edited by sandy666; 06-22-2017 at 11:04 AM.

  11. #11
    Registered User
    Join Date
    01-22-2015
    Location
    Whitby
    MS-Off Ver
    2016
    Posts
    27

    Re: Totaling Months and Years from a Date Range

    My COM Add-ins only contain 2 options: Acroboat PDFMaker Office COM Addin and Microsoft Power Map for Excel. I have nothing else in my "Calculations" option. The screenshot you sent me is exactly what I'm looking for.
    Also, could you please tell me how to mark this thread as solved? I don't see anywhere on my screen

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Totaling Months and Years from a Date Range

    I'm not responsible for what you have at your computer. I see only the excel version so I assume you have what you need. Maybe you have a version for students? Changing the profile in this profile will be easier for you and for us.
    and
    How to....
    Go to the top of this thread and use Thread Tools...

    marksolved.jpg

    and check this
    or read here: Customize Ribbon

    ppribbon.jpg
    Last edited by sandy666; 06-22-2017 at 12:00 PM.

+ 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. Decimal to Years, Months & date conversion
    By m_skumar in forum Excel General
    Replies: 13
    Last Post: 09-28-2021, 04:51 PM
  2. [SOLVED] Age based on DOB; Accounts for leap years. Years old if >2, Months if <2 years old.
    By sharpmel in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-17-2013, 04:20 PM
  3. Date difference in Years and months
    By xenos14 in forum Excel General
    Replies: 4
    Last Post: 11-07-2012, 08:48 AM
  4. No. in age range if age in years and months
    By 13sydwest in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-28-2011, 08:34 AM
  5. Replies: 1
    Last Post: 06-29-2006, 09:30 AM
  6. Date since hired displayed in years.months
    By JL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2006, 11:20 PM
  7. Replies: 2
    Last Post: 02-28-2006, 04:25 PM
  8. Excel Adding years or months to a date
    By Joan in forum Excel General
    Replies: 2
    Last Post: 04-25-2005, 04:06 PM

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