+ Reply to Thread
Results 1 to 6 of 6

Create month groups

  1. #1
    Registered User
    Join Date
    12-22-2014
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    89

    Create month groups

    Hi Experts,

    Can someone please advise access database formula to group date into last 12 months and then do a count of the same date in each month group

    The Month groups are M - Current month, M1 Last month, M2 Month prior to last month and so on until M12: 12th Month prior

    Attached is data table and on the right is the query result expected

    I am doing this in access database query design (not SQL view)

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Create month groups

    For Excel, in H4, copied across:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Ben Van Johnson

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: Create month groups

    Please provide your sample db in Access and not Excel so that we can build your query appropriately. You will need to zip your db to upload it. Limit the size to 10-15 records.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    12-22-2014
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    89

    Re: Create month groups

    Hi Alansidman,

    Here is attached sample DB
    Attached Files Attached Files

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: Create month groups

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

  6. #6
    Registered User
    Join Date
    12-22-2014
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    89

    Re: Create month groups

    Thanks Alansidman.

    Is there any chance to get it in a crosstab format as attached picture with the ITEM_NUMBER and LOCATION included?

    As I have many Item_NUMBER and LOCATION, so each combination of ITEM_NUMBER & LOCATION will be one row
    and the count of STOCKDOWNLOAD date is stacked in columns beside it.

    Cheers
    Attached Images Attached Images

+ 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] Sum the expenses by month - groups of contractors
    By Ymmies in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-13-2022, 04:33 AM
  2. [SOLVED] Create dynamic rolling 3 month data that increases in one month increments
    By v_pilling in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-24-2017, 01:33 PM
  3. Trying to create Age bucket groups
    By chandramouliarun in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-07-2016, 12:30 PM
  4. [SOLVED] Pivot Table Not Grouping by Month for Latest Month (groups > 7/20/2013)
    By justforthis1 in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 09-04-2013, 12:28 PM
  5. Replies: 7
    Last Post: 02-20-2012, 01:51 PM
  6. Stacked Column chart that groups dates by month
    By bigban in forum Excel General
    Replies: 2
    Last Post: 07-08-2011, 05:37 AM
  7. Create groups without duplicates
    By Silverdust in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-23-2010, 08:53 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