SELECT qryQAMeasures.ActualDateUTC, qryQAMeasures.LineID, qryQAMeasures.ProductFamilyCode, qryNEWESTProductFamilyStandards.SheetMin, qryNEWESTProductFamilyStandards.WidthMin, qryNEWESTProductFamilyStandards.LengthMin, qryQAMeasures.Name, qryQAMeasures.Value, qryNEWESTProductFamilyStandards.MaxOfMaxOfEffectiv eDate, ( SELECT AVG([Value]) FROM [qryQAMeasures] WHERE [Name] = "Sheet Length*" ) AS AvgSheetCount FROM qryQAMeasures INNER JOIN qryNEWESTProductFamilyStandards ON (qryQAMeasures.LineID = qryNEWESTProductFamilyStandards.LineID) AND (qryQAMeasures.ProductFamilyCode = qryNEWESTProductFamilyStandards.ProductFamilyCode) GROUP BY qryQAMeasures.ActualDateUTC, qryQAMeasures.LineID, qryQAMeasures.ProductFamilyCode, qryNEWESTProductFamilyStandards.SheetMin, qryNEWESTProductFamilyStandards.WidthMin, qryNEWESTProductFamilyStandards.LengthMin, qryQAMeasures.Name, qryQAMeasures.Value, qryNEWESTProductFamilyStandards.MaxOfMaxOfEffectiv eDate, ( SELECT AVG([Value]) FROM [qryQAMeasures] WHERE [Name] = "Sheet Length*" ) HAVING ( ((qryQAMeasures.ActualDateUTC) = #1 / 8 / 2020 #) AND ((qryQAMeasures.LineID) = "324") AND ( (qryQAMeasures.Name) = "Sheet Count" OR (qryQAMeasures.Name) = "Sheet Width" OR (qryQAMeasures.Name) LIKE "Sheet Length*" ) );