Results 1 to 5 of 5
  1. #1
    HoosierIT is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2014
    Posts
    2

    Formula Help... Calculating charges based on stepped rates.

    Never tried complicated formulas in Access and at a bit of a loss... What I am trying to do is calculate a utility bill based on stepped rated.

    For example:

    Usage up to the first 500KHW is billed at .067 per KWH
    Usage after the first 500KWH from 501 to 999 is billed at .044 per KWH
    Usage from 1000 up is billed at .0318



    So if my usage was 1200 KWH...

    ((500 x .067)+(500 x .044)+(200 x .0318)) = 61.86

    I was assuming it would require an complex "if" function to split the 1200 into steps and then calculate charges per step?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    A single expression in query or textbox would be complicated. Probably should build a function to handle this.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    HoosierIT is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2014
    Posts
    2
    I actually meant to post this to an Excel forum... But if anyone happens to have knowledge of Excel...

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Could certainly do a calc in separate cells to test for each level and calculate the amount then add the 3 cells. Actually could do that in Access query as well.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    this should get you started :
    Need to separately calculate the three slabs in a query like
    Slab1 : IIf([Usage]<500,[Usage]*0.67,500*0.67)
    Slab2 : IIf([Usage]>500, IIf([Usage]>1000,500*0.44,([Usage]-500)*0.44),0)
    Slab3 : IIf([Usage]>1000,([Usage]-1000)*0.0.318,0)
    Total : Slab1 +Slab2+Slab3
    You will need to fine tune the limits in above formulae.

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

Similar Threads

  1. Loop skips a large number of records unless stepped through
    By Monterey_Manzer in forum Programming
    Replies: 1
    Last Post: 10-04-2013, 05:01 PM
  2. Calculating a new field using a formula
    By mccambe21 in forum Queries
    Replies: 1
    Last Post: 09-04-2013, 12:16 PM
  3. How to work out commission rates
    By matpaulin in forum Queries
    Replies: 1
    Last Post: 02-07-2013, 06:15 PM
  4. Replies: 1
    Last Post: 06-09-2012, 05:27 PM
  5. Total based on Formula based on field value
    By cjbuechler in forum Reports
    Replies: 15
    Last Post: 07-10-2009, 09:56 AM

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