Results 1 to 6 of 6
  1. #1
    Tabasco77 is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2022
    Posts
    3

    Create Query to calculate month over month decrease


    I'm trying to create a query that will effectively allow me to plug in a forfeiture rate per month, and the original shares as of a given date, and then have it calculate all future months based on that.

    So ideally, i'll have a table with all of the future months, and the forfeiture rate per month (assume 1%). Another table will have the #of shares as of today (assume 3/31/2022 & 1,000). The forfeiture rate will be applied to the prior month's ending units, so it will change over time. The query will give me the following:

    Month Ending Shares
    3/31/2022 1000
    4/30/2022 990
    5/31/2022 980.1
    6/30/2022 970.29

    There must be a way to accomplish this right?

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,121
    You would need something like a ranking query (or row numbering) using the month-end dates as the unique ids:

    https://stackoverflow.com/questions/...crosoft-access

    https://bytes.com/topic/access/insig...-ms-access-sql
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    Tabasco77 is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2022
    Posts
    3
    Not sure I follow or if this will give me exactly what I want. I don't see how the ranking will actually calculate 1000 * .01 for April, then use 990 * .01 to calculate May, then 980.1 to calculate June. It's more like a repeated query so each month is calculated off of the prior month. Again, could totally be that I'm just missing something here...

    The other thing to mention is the forfeiture rate can change month over month, so it's not necessarily going to stay a constant.

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,121
    I was thinking at something like this.

    Cheers,
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    Tabasco77 is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2022
    Posts
    3
    That is absolutely amazing!!! Thank you very much for sorting this out for me! Saved me hours of scratching my head!

  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,121
    You're very welcome!
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 02-18-2015, 08:28 AM
  2. Replies: 3
    Last Post: 12-29-2014, 10:14 AM
  3. Replies: 5
    Last Post: 06-17-2014, 12:11 AM
  4. Replies: 6
    Last Post: 05-05-2014, 10:51 PM
  5. Replies: 4
    Last Post: 05-26-2013, 03:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums