This is my attempt.
It shows a way of using SQL (Group, Sum and TOP)
to display a Sum of the Lowest 10 values of each Group of records.
The data in this sample is from the zip file in post 17.
Try this sql
Code:
SELECT esandres.branch
,Sum(esandres.UnknownLossValue) AS SumOfUnknownLossValue
FROM esandres
WHERE esandres.UnknownLossValue IN (
SELECT TOP 10 UnknownLossValue
FROM esandres AS X
WHERE x.branch = esandres.branch
ORDER BY UnknownLossValue
)
GROUP BY esandres.branch
Result based on your data file is
branch |
SumOfUnknownLossValue |
101 |
-2592.939152 |
102 |
-3504.529616 |
I removed spaces from field names and imported into access as table Esandres