Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Calculate a percentage using 2 different query totals

 
   Database Help (Home) -> MS Access -> Tables DB Design RSS
Next:  cannot access database  
Author Message
jbeck2010

External


Since: Feb 09, 2005
Posts: 11



(Msg. 1) Posted: Tue Feb 22, 2005 11:29 am
Post subject: Calculate a percentage using 2 different query totals
Archived from groups: microsoft>public>access>tablesdbdesign (more info?)

I have setup 2 separate queries to get specific totals. It is impossible to
combine them into 1, as they both use 1 key field with different criteria to
get the correct total.

Is there any way to calculate and display, in a query or report, a
percentage as it relates to those 2 totals.

Example: Total bought 3,200 Total available 10,000 = 3,200/10,000=32%

All I Need is the percentage to show with the appropriate record, not the
calculation.

Please Help,
jbeck2010

 >> Stay informed about: Calculate a percentage using 2 different query totals 
Back to top
Login to vote
Duane Hookom1

External


Since: Jan 13, 2004
Posts: 13



(Msg. 2) Posted: Tue Feb 22, 2005 8:11 pm
Post subject: Re: Calculate a percentage using 2 different query totals [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

If each query returns only one record, you can combine them in another
query.

SELECT query1.*, query2.*
FROM query1, query2;

--
Duane Hookom
MS Access MVP


"jbeck2010" wrote in message

 >I have setup 2 separate queries to get specific totals. It is impossible to
 > combine them into 1, as they both use 1 key field with different criteria
 > to
 > get the correct total.
 >
 > Is there any way to calculate and display, in a query or report, a
 > percentage as it relates to those 2 totals.
 >
 > Example: Total bought 3,200 Total available 10,000 = 3,200/10,000=32%
 >
 > All I Need is the percentage to show with the appropriate record, not the
 > calculation.
 >
 > Please Help,
 > jbeck2010
 >

 >> Stay informed about: Calculate a percentage using 2 different query totals 
Back to top
Login to vote
jbeck2010

External


Since: Feb 09, 2005
Posts: 11



(Msg. 3) Posted: Tue Feb 22, 2005 8:11 pm
Post subject: Re: Calculate a percentage using 2 different query totals [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Duane,

It was great to hear from you and thanks again for your help earlier this
month.
I don't quite understand what you meant by SELECT query1.*, query2.*
FROM query1, query2; I assume it is code or an expression to be written some
place or is it a proceedure?

Let me try to be a little more specific about what I am trying to do.
The 2 queries are setup as follows;

1. Customer ID, Customer Name, Product, Product Type=Total Individual
Purchased
Sum Not Canceled and
Not Void

2. Product, Product Type=Total Product Sold to Everyone
Sum Sold

*What I am trying to do is show the percentage one Cusomer has purchased in
relationship to the total Product sold.

Duane, I would like to thank you in advance for your time and expert advise
in solving my dilemma.

Best Regards,
jbeck2010

"Duane Hookom" wrote:

 > If each query returns only one record, you can combine them in another
 > query.
 >
 > SELECT query1.*, query2.*
 > FROM query1, query2;
 >
 > --
 > Duane Hookom
 > MS Access MVP
 >
 >


  > >I have setup 2 separate queries to get specific totals. It is impossible to
  > > combine them into 1, as they both use 1 key field with different criteria
  > > to
  > > get the correct total.
  > >
  > > Is there any way to calculate and display, in a query or report, a
  > > percentage as it relates to those 2 totals.
  > >
  > > Example: Total bought 3,200 Total available 10,000 = 3,200/10,000=32%
  > >
  > > All I Need is the percentage to show with the appropriate record, not the
  > > calculation.
  > >
  > > Please Help,
  > > jbeck2010
  > >
 >
 >
 >
 >> Stay informed about: Calculate a percentage using 2 different query totals 
Back to top
Login to vote
Duane Hookom1

External


Since: Jan 13, 2004
Posts: 13



(Msg. 4) Posted: Tue Feb 22, 2005 11:49 pm
Post subject: Re: Calculate a percentage using 2 different query totals [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Can't you create two totals queries where the ProductID is unique in each
query. One query contains only orders from a single customer while the other
contains orders from all customers? Then join the two queries together by
the ProductID?

--
Duane Hookom
MS Access MVP


"jbeck2010" wrote in message

 > Duane,
 >
 > It was great to hear from you and thanks again for your help earlier this
 > month.
 > I don't quite understand what you meant by SELECT query1.*, query2.*
 > FROM query1, query2; I assume it is code or an expression to be written
 > some
 > place or is it a proceedure?
 >
 > Let me try to be a little more specific about what I am trying to do.
 > The 2 queries are setup as follows;
 >
 > 1. Customer ID, Customer Name, Product, Product Type=Total Individual
 > Purchased
 > Sum Not Canceled and
 > Not Void
 >
 > 2. Product, Product Type=Total Product Sold to Everyone
 > Sum Sold
 >
 > *What I am trying to do is show the percentage one Cusomer has purchased
 > in
 > relationship to the total Product sold.
 >
 > Duane, I would like to thank you in advance for your time and expert
 > advise
 > in solving my dilemma.
 >
 > Best Regards,
 > jbeck2010
 >
 > "Duane Hookom" wrote:
 >
  >> If each query returns only one record, you can combine them in another
  >> query.
  >>
  >> SELECT query1.*, query2.*
  >> FROM query1, query2;
  >>
  >> --
  >> Duane Hookom
  >> MS Access MVP
  >>
  >>


   >> >I have setup 2 separate queries to get specific totals. It is impossible
   >> >to
   >> > combine them into 1, as they both use 1 key field with different
   >> > criteria
   >> > to
   >> > get the correct total.
   >> >
   >> > Is there any way to calculate and display, in a query or report, a
   >> > percentage as it relates to those 2 totals.
   >> >
   >> > Example: Total bought 3,200 Total available 10,000 =
   >> > 3,200/10,000=32%
   >> >
   >> > All I Need is the percentage to show with the appropriate record, not
   >> > the
   >> > calculation.
   >> >
   >> > Please Help,
   >> > jbeck2010
   >> >
  >>
  >>
  >>
 >> Stay informed about: Calculate a percentage using 2 different query totals 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Day, week, and month totals - I need to create a Database that will allow me to create a report of the data by day, week, and month on one sheet. Each day has only one record, but there are multiple fields in each record. Along the top of the report would have to be a list of..

Set up a report using more than one query - I have set up 5 different queries to calculate one specific total each. I have also set up 5 accompaning forms. They work great. When I try to produce a report through the report wizard it says that the source of the queries are not compatible or..

Help with a query design - I have three tables: Customers, Products and CustomerProducts. For simplicity, the Customers table has two fields: CustID and CustName. The Products table has three fields: ProdID, ProdName and ProdPrice. The CustomerProducts table has three fields:..

Store a result from a query - Hi Everyone, I need help from start to finish because I think there are probably many steps to do this. I would like to put a command button on a form so when the user clicks on it, the result from my query will be stored in a table or excel..

Access perameter Query - I have a query I need to create that is based on 1 query and 2 tables. What is need is for the perameter to only prompt for another criterion if the person selects yes on the prompt for criteria. Ex: When the user runs the query (via report), they coul...
   Database Help (Home) -> MS Access -> Tables DB Design All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]