A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Getting % As Total A97



 
 
Thread Tools Display Modes
  #1  
Old February 21st, 2007, 12:23 PM posted to microsoft.public.access.queries
Kahuna
external usenet poster
 
Posts: 17
Default Getting % As Total A97

Hi Folks - using the following query I calculate a total area based on three
criteria.

SELECT qryFabricCondition.fc_base_year1 AS [Base Year],
Sum(budget_schedules.bs_m2) AS [Area M2], qryFabricCondition.fc_ccr_value AS
Criticality
FROM qryFabricCondition INNER JOIN budget_schedules ON
qryFabricCondition.fc_id = budget_schedules.fc_fabric_key
WHERE (((qryFabricCondition.ad_analysis_code)"20"))
GROUP BY qryFabricCondition.fc_base_year1, qryFabricCondition.fc_ccr_value
HAVING (((qryFabricCondition.fc_base_year1) Is Not Null));

Is there an easy way to generate the % each area represents of the total of
all areas, within the same query?

Appreciate any feedback.

--
Kahuna
------------


  #2  
Old February 23rd, 2007, 07:55 PM posted to microsoft.public.access.queries
Michel Walsh
external usenet poster
 
Posts: 2,404
Default Getting % As Total A97

Sure, something like:

SELECT ... ,
SUM(budget_schedules.bs_m2) AS [Area M2] / (SELECT SUM(bs_m2) FROM
budget_schedules),
...


Hoping it may help,
Vanderghast, Access MVP


"Kahuna" wrote in message
...
Hi Folks - using the following query I calculate a total area based on
three criteria.

SELECT qryFabricCondition.fc_base_year1 AS [Base Year],
Sum(budget_schedules.bs_m2) AS [Area M2], qryFabricCondition.fc_ccr_value
AS Criticality
FROM qryFabricCondition INNER JOIN budget_schedules ON
qryFabricCondition.fc_id = budget_schedules.fc_fabric_key
WHERE (((qryFabricCondition.ad_analysis_code)"20"))
GROUP BY qryFabricCondition.fc_base_year1, qryFabricCondition.fc_ccr_value
HAVING (((qryFabricCondition.fc_base_year1) Is Not Null));

Is there an easy way to generate the % each area represents of the total
of all areas, within the same query?

Appreciate any feedback.

--
Kahuna
------------




  #3  
Old February 24th, 2007, 10:10 AM posted to microsoft.public.access.queries
Kahuna
external usenet poster
 
Posts: 17
Default Getting % As Total A97

WOW Michel - that makes sense!

I'll give it a try thanks.

Cheers

--
Kahuna
------------
"Michel Walsh" vanderghast@VirusAreFunnierThanSpam wrote in message
...
Sure, something like:

SELECT ... ,
SUM(budget_schedules.bs_m2) AS [Area M2] / (SELECT SUM(bs_m2) FROM
budget_schedules),
...


Hoping it may help,
Vanderghast, Access MVP


"Kahuna" wrote in message
...
Hi Folks - using the following query I calculate a total area based on
three criteria.

SELECT qryFabricCondition.fc_base_year1 AS [Base Year],
Sum(budget_schedules.bs_m2) AS [Area M2], qryFabricCondition.fc_ccr_value
AS Criticality
FROM qryFabricCondition INNER JOIN budget_schedules ON
qryFabricCondition.fc_id = budget_schedules.fc_fabric_key
WHERE (((qryFabricCondition.ad_analysis_code)"20"))
GROUP BY qryFabricCondition.fc_base_year1,
qryFabricCondition.fc_ccr_value
HAVING (((qryFabricCondition.fc_base_year1) Is Not Null));

Is there an easy way to generate the % each area represents of the total
of all areas, within the same query?

Appreciate any feedback.

--
Kahuna
------------






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.