Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# Calculate APY in Access

Posted on 2004-08-31
Medium Priority
354 Views
Hello, I have an access table that has these two fiedls - TERM and RATE. To calculate the APY, currently I have to export this table to excel and run this formula:
=((1+RATE/100)^(TRUNC(TERM/12))*(1+(RATE/100*(TERM-TRUNC(TERM/12)*12))^(12/TERM)-1. Then, I have to import the excel file back into access and perform the rest of the queries.
Is there a way to perform this calculation in access? Thank you
0
Question by:lnchopo
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 4

Expert Comment

ID: 11943107
I think your problem is with the TRUNC function.

Try changing it to INT, (look up help on INT and FIX to see which function is better for you. Both drop the decimals, but handle negative numbers differently.)

=((1+RATE/100)^(INT(TERM/12))*(1+(RATE/100*(TERM-INT(TERM/12)*12))^(12/TERM)-1)
0

LVL 41

Accepted Solution

shanesuebsahakarn earned 1000 total points
ID: 11943113
You can use this expression in a query:

((1+[RATE]/100)^(Fix([TERM]/12))*([RATE]/100*([TERM]-Fix([TERM]/12)*12))^(12/[TERM])-1

In other words, you can write a query like this:
SELECT *, ((1+[RATE]/100)^(Fix([TERM]/12))*([RATE]/100*([TERM]-Fix([TERM]/12)*12))^(12/[TERM])-1 As APY FROM MyTable

This will return all of the fields in your table, plus a calculated field called APY with the results of your calculation.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
###### Suggested Courses
Course of the Month9 days, 23 hours left to enroll