M
michaelloveusa via AccessMonster.com
Hi there.
I haven't worked on Access for a few years and I was asked today to help
someone with a query to calculate Year over Year percentage changes. Here is
the current situation:
A single table has these columns (simplified) and sample data:
Year TaxAmount
2006 55000
2005 50000
2004 43000
What I need to do is dynamically create another column that calculates the
YOY change for each year. The formula is simple (CurrentYear TaxAmount -
Previous Year Tax Amount) / Previous Year Tax Amount. Example shown here:
Year TaxAmount YOYPercent
2006 55000 10.0%
2005 50000 25.0%
2004 40000 null
Easy to calculate, but not sure how to dynamically use current year to get
previous year's amount. Should I try a subselect or a function etc? Been a
while since I have done Access, so any help would be appreciated.
Thanks, Mike
I haven't worked on Access for a few years and I was asked today to help
someone with a query to calculate Year over Year percentage changes. Here is
the current situation:
A single table has these columns (simplified) and sample data:
Year TaxAmount
2006 55000
2005 50000
2004 43000
What I need to do is dynamically create another column that calculates the
YOY change for each year. The formula is simple (CurrentYear TaxAmount -
Previous Year Tax Amount) / Previous Year Tax Amount. Example shown here:
Year TaxAmount YOYPercent
2006 55000 10.0%
2005 50000 25.0%
2004 40000 null
Easy to calculate, but not sure how to dynamically use current year to get
previous year's amount. Should I try a subselect or a function etc? Been a
while since I have done Access, so any help would be appreciated.
Thanks, Mike