I am trying to get a an expression to work in a Group By query that would divied two coulombs but not be part of the grouping, I am looking for just the results of the division expression to be related to the sum of the two columns.
In the example Statement below when I add the < [MtdHistory]![LABOR$]/[MtdHistory]![SOLD-HOURS]) AS ELR > it separates all the unique values and brakes up the group by sum of the fields I need totaled.
SELECT MtdHistory.STORE, MtdHistory.SA, Left([MtdHistory]![LBR-TYPE],1) AS [Labor Type], Sum(MtdHistory.[SOLD-HOURS]) AS [Total Sold Hrs], Sum(MtdHistory.[LABOR$]) AS [SumOfLABOR$], IIf([MtdHistory]![SOLD-HOURS]=0,0,[MtdHistory]![LABOR$]/[MtdHistory]![SOLD-HOURS]) AS ELR
FROM MtdHistory
GROUP BY MtdHistory.STORE, MtdHistory.SA, Left([MtdHistory]![LBR-TYPE],1), IIf([MtdHistory]![SOLD-HOURS]=0,0,[MtdHistory]![LABOR$]/[MtdHistory]![SOLD-HOURS]);
Thanks for any help