473,408 Members | 2,027 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,408 software developers and data experts.

Calculating In Access

I have serious Access problems so please be gentle.

I have one table that stores the quantities and
net sales for thousands of Products.

I have another table that has fixed costs values
on a country level.

I need to apply a percentage (based on net sales) of
the fixed costs across the products.

This is no problem in Excel, how about in Access.

Example.

Product Table

Product Country Qty Sold Net Sales
Trash Can A US 1 5.00
Trash Can B GB 2 10.00
Paper Sack A US 3 3.00
Paper Sack B GB 4 4.00

Fixed Costs Table

Country Fixed Costs
US 20.00
GB 15.00

In Need Of:
calculated
field
Product Country Qty Sold Net Sales Fixed Cost
Trash Can A US 1 5.00 12.50
Trash Can B GB 2 10.00 14.29
Paper Sack A US 3 3.00 7.50
Paper Sack B GB 4 4.00 5.71

Formula = (Net Sales / (Total Country Net Sales))
* Fixed Cost

Any suggestions on how to do this in Access without
first doing it in Excel and importing?

Thanks In Advance (TIA)
Nov 12 '05 #1
1 2277
First, you need to create a query that rolls up the total NetSales by Country:

SELECT Country, SUM([Net Sales]) As NetTotal
FROM [Product Table]
GROUP BY Country

Save that as qryNetByCountry

Then create a query that joins the 2 tables and the new query together on on
the country field:

SELECT P.Product, P.Country, P.Qty, P.Net, (P.Net/N.NetTotal)*F.FixedCost As
NetFixedCost
FROM qryNetByCountry N INNER JOIN ([Product Table] P INNER JOIN [Fixed Cost
Table] F ON P.Country = F.Country) ON N.Country = F.Country

DISCLAIMER: I have not tested any this....use only as a guide. The improtant
thing to gather are:

1) Create the qryNetByCountry query
2) Join that query along with the other tables
3) Do your calculation.
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John | last post by:
hey all..... alright, I am frusterated to the point of throwing my machine out the window (this board went down, trying to find stuff on google, this has been a nightmare) so I hope you guys can...
0
by: peterleeds | last post by:
Could anyone explain why Access 2003 is continuously calculating a continuous form, when it works perfectly in previous versions? On reading previous messages I gather that overlapping controls...
2
by: kuhni | last post by:
Hi everybody! After searching newsgroups for a couple of hours, I now try asking directly (running the risk of asking again the same question). My problem is to predict when the size of the...
0
by: robin9876 | last post by:
In an Access 2000 database on some forms 'Calculating...' is continuously displayed in the status bar window and the text of the control is automatically selected. The only workaround is switching...
1
by: Nixeh | last post by:
Hey guys, New to the forums but ive hit a snag whilst updating a Access Database at work. Currently trying to repair and maintain a database that has been built by 6 people all with even worse...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.