on the surface this seems easy, but I am struggling. two tables
tbldata (four fields 6,270 rows)
custid 2015cellcode 2015qty 2015amt
12673 1243 100 1,000.00
12673 1250 200 2,000.00
etc etc
tblmntlyalloc (Three fields and 12 rows i.e. one row for each month)
2015mnth, 2015allocation, 2015wrkdays
jan 98 20
feb 93 19
etc etc etc
so in order to handle seasonality of sales, the sales department is given 1,200 points. you can then allocation any number of points (75 - 125) per month. But the total number of points must equal 1,200. So I created a table with the monthly allocation and workdays. I could hard code the % and work days into the formula like this
Jan1
[2015amt]*(98/1200)) / 20
Feb1
[2015amt]*(93/1200)) / 19
and this does work very well to get me my daily sales amount per month/wrkday
however I know sales will change the monthly allocation (still totals 1200) and HR could even have a change to the holiday schedule. So I want to utilize the table.
so my query brings in both tables, but they are not linked. And this is my formula.
Jan1
[2015amt]*([2015allocation]/1200) / [2015wrkdays]
Feb1
[2015amt]*([2015allocation]/1200) / [2015wrkdays]
Mar1
[2015amt]*([2015allocation]/1200) / [2015wrkdays]
Apr1
[2015amt]*([2015allocation]/1200) / [2015wrkdays]
etc etc for 12 months
so I need it to find the value for Jan in the Jan formula, and Feb in the feb formula etc. For some reason my brain is not working today and I cannot determine the correct query formula.
tbldata (four fields 6,270 rows)
custid 2015cellcode 2015qty 2015amt
12673 1243 100 1,000.00
12673 1250 200 2,000.00
etc etc
tblmntlyalloc (Three fields and 12 rows i.e. one row for each month)
2015mnth, 2015allocation, 2015wrkdays
jan 98 20
feb 93 19
etc etc etc
so in order to handle seasonality of sales, the sales department is given 1,200 points. you can then allocation any number of points (75 - 125) per month. But the total number of points must equal 1,200. So I created a table with the monthly allocation and workdays. I could hard code the % and work days into the formula like this
Jan1

Feb1

and this does work very well to get me my daily sales amount per month/wrkday
however I know sales will change the monthly allocation (still totals 1200) and HR could even have a change to the holiday schedule. So I want to utilize the table.
so my query brings in both tables, but they are not linked. And this is my formula.
Jan1

Feb1

Mar1

Apr1

etc etc for 12 months
so I need it to find the value for Jan in the Jan formula, and Feb in the feb formula etc. For some reason my brain is not working today and I cannot determine the correct query formula.