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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|