473,404 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

YOY Growth Rate formula across muliple clients/months

I have a table with historical actual items history by client, by month. I have a 2nd table for YOY growth rate by client, by month. I'm looking for help to use these 2 tables to create a forecast for future periods (by month) that would multiple the YOY growth rate (from table 2) by the same prior year's month actuals (frome table 1).

Today, this is done in excel with the following formula:
Client 1: May 2014 FCST = ROUND(AR9*1.05,0), where AR9 is May 2013.

Expand|Select|Wrap|Line Numbers
  1. Table 1 Sample:
  2. Client    MonthValue    YearValue    SumOfItems
  3. Client 1    1             2014            12
  4. Client 2    2             2014            10
  5. Client 1    3             2014            14
  6. Client 2    10            2013            1
  7. Client 1    11            2013            14
  8. Client 2    12            2013            12
Expand|Select|Wrap|Line Numbers
  1. Table 2 Sample:
  2. Client      ForecastMonth      YOY Growth Input
  3. Client 1      5                  0.00%
  4. Client 2      5                  10.00%
  5. Client 1      6                  5.00%
  6. Client 2      6                  2.00%
  7. Client 1      7                  10.00%
  8. Client 2      7                  10.00%
Apr 9 '14 #1
9 2322
Seth Schrock
2,965 Expert 2GB
I'm not sure what I YOY Growth Rate is, but I think that I can follow your formula. I think that the easiest method would use a DLookup() function. Something like this
Expand|Select|Wrap|Line Numbers
  1. Round([SumOfItems] * DLookup("YOY Growth Input", "Table 2", "Client = " & Client & " And ForecaseMonth = " & MonthValue) + .000001, 0)
This would get you the prediction for the next year. But I believe from your question that you want the prediction for the current year based on last year's value. So, here I do that in a query.
Expand|Select|Wrap|Line Numbers
  1. SELECT Client
  2. , MonthValue
  3. , YearValue
  4. , SumOfItems
  5. , Round(
  6.     DLookup("SumOfItems", "Table 1"
  7.         , "Client = " & Client 
  8.         & " AND MonthValue = " & MonthValue 
  9.         & " AND YearValue = " & YearValue - 1) 
  10.     * DLookup("YOY Growth Input", "Table 2"
  11.         , "Client = " & Client 
  12.         & " And ForecaseMonth = " & MonthValue)
  13.      + .000001, 0) As Prediction
  14. FROM [Table 1]
The trick will be that some of your data won't have a record for the previous year so somewhere you would need to allow for that so that you don't get an error. Without a test database to work on, I'm not sure at which step it would be best to do this, but you would just use the Nz() function to test for a returned null value and assign it a number.
Apr 11 '14 #2
YOY is just short for Year over Year. So, if May 2012 is 250 items and May 2013 is 260 items, then the year over year growth rate (YOY Growth Rate0 is 4%). So, in this example, we'd want May of 2014 to be (4% * 260). Now, I'm doing all of my work in a select query. How do I write this code as part of my query?
Apr 11 '14 #3
Seth Schrock
2,965 Expert 2GB
So are you predicting or just calculating what the growth was?
Apr 11 '14 #4
The growth rate is an input.
Apr 21 '14 #5
Seth Schrock
2,965 Expert 2GB
So you input the growth rate and then predict next years amount based on this year?
Apr 22 '14 #6
Yes.

Client 1:
May 2014 = May 2013 * (YOY Growth Rate)
Jun 2014 = Jun 2013 * (YOY Growth Rate)
Jul 2014 = Jul 2013 * (YOY Growth Rate)

Client 2:
May 2014 = May 2013 * (YOY Growth Rate)
Jun 2014 = Jun 2013 * (YOY Growth Rate)
Jul 2014 = Jul 2013 * (YOY Growth Rate)
Apr 22 '14 #7
Table 1 Variables:
Client Name
Forecast Month
Forecast Year
YOY Growth Rate

Table 2 Variables (this table contains all of the historical actuals by month by client):
Client Name
Actuals Month
Actuals Year
Items

Does that make sense?
Apr 22 '14 #8
So, I just want the output to be all "future months" of 2014 by Client by month.
Apr 22 '14 #9
zmbd
5,501 Expert Mod 4TB
taking a look at your example data... how are you handling months that are in table 2 and NOT in table 1.

You can group by client, then month, and use a join on the client+month to return the factor; however, that will only work if you have a corresponding month. You could still use a loopup (yuck) to find the closest month to the target month.
Apr 22 '14 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: David | last post by:
I am learning plsql. I would like to run a stored procedure to calculate my bank account value by predicted 10% annual growth rate. Below is my plsql that is having problems. Your help is highly...
28
by: DFS | last post by:
I'm unfortunately about to change, or sever, a two-year relationship with a very slow-paying client. Most of the 15 invoices I've sent them arrive 6 to 8 weeks late, and usually only after...
3
by: MMFBprez | last post by:
I am trying to compute storage charges by getting the number of months between dates and multiplying it by a rate. I cannot get a correct number of months if the date is greater than a year ago. ...
6
by: Programador | last post by:
I'm getting this error when running this program: Cannot calculate rate using the arguments provided Module Module1 Sub Main() Rate(360, -694.44444444444446, 244274.69178082192) End Sub
8
by: teddarr | last post by:
I'm having trouble getting a mathmatical formula to work in my code. I am supposed to write a program in java that calculates the ending balance each month. The user is supposed to input the...
2
by: katara | last post by:
how can i find out the growth rate of table, oracle 8 os window abhi
4
by: =?Utf-8?B?QUEyZTcyRQ==?= | last post by:
Why does System.Globalization.DateTimeFormatInfo.CurrentInfo.MonthNames return 13 elements? Why does it not use the cuurent culture?
0
by: samyphp | last post by:
i am trying to broadcast continuous data from server using udp connection... while accessing from single client its working fine... but while accessing from multiple clients its not working and...
2
by: Anni V | last post by:
Hi Can some one please help me with the formula to find the EMI from the textbox values txtemiconvamount ddltenure txtemicalcroi to display the EMI amount in the textbox txtemiamount The...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.