A
Audrey1980
Hi
I have the following query where I am getting store + input margin.
The problem is: it is printing out input margin per PG. I want to get an
average across all PGs for the branch (and year and week). I thought if I
just grouped by PG that would work but alas no. I've tried doing an average
of (([Extd_REV]-[Extd_WCEV])/[Extd_REV]) but it doesnt like this.
Any other ideas?
Many thanks
PARAMETERS [Forms]![Main Menu]![Store] Text ( 255 ), [Forms]![Main
Menu]![Year] Text ( 255 ), [Forms]![Main Menu]![Week] Text ( 255 );
SELECT dbo_Despatch_data_branch_summary.Branch,
(([Extd_REV]-[Extd_WCEV])/[Extd_REV]) AS [Input Margin]
FROM dbo_Despatch_data_branch_summary
WHERE (((dbo_Despatch_data_branch_summary.Year)=[Forms]![Main Menu]![Year])
AND ((dbo_Despatch_data_branch_summary.Week)=[Forms]![Main Menu]![Week]))
GROUP BY dbo_Despatch_data_branch_summary.Branch,
dbo_Despatch_data_branch_summary.Extd_WCEV,
dbo_Despatch_data_branch_summary.Extd_REV,
dbo_Despatch_data_branch_summary.PG;
I have the following query where I am getting store + input margin.
The problem is: it is printing out input margin per PG. I want to get an
average across all PGs for the branch (and year and week). I thought if I
just grouped by PG that would work but alas no. I've tried doing an average
of (([Extd_REV]-[Extd_WCEV])/[Extd_REV]) but it doesnt like this.
Any other ideas?
Many thanks
PARAMETERS [Forms]![Main Menu]![Store] Text ( 255 ), [Forms]![Main
Menu]![Year] Text ( 255 ), [Forms]![Main Menu]![Week] Text ( 255 );
SELECT dbo_Despatch_data_branch_summary.Branch,
(([Extd_REV]-[Extd_WCEV])/[Extd_REV]) AS [Input Margin]
FROM dbo_Despatch_data_branch_summary
WHERE (((dbo_Despatch_data_branch_summary.Year)=[Forms]![Main Menu]![Year])
AND ((dbo_Despatch_data_branch_summary.Week)=[Forms]![Main Menu]![Week]))
GROUP BY dbo_Despatch_data_branch_summary.Branch,
dbo_Despatch_data_branch_summary.Extd_WCEV,
dbo_Despatch_data_branch_summary.Extd_REV,
dbo_Despatch_data_branch_summary.PG;