Forum Discussion

kcdistiller's avatar
kcdistiller
Frequent Visitor
9 years ago
Solved

Sum value and running total based on unique id from another table

I have a table with unique local id's, local text, values, standardized ID's, and standardized text that looks like this:

 

local IDlocal Textvaluestd IDstd Text
123Ibuprofen15AAAIBUPROFEN
456Advil4AAAIBUPROFEN
789Motrin0AAAIBUPROFEN
111Amoxil3BBBAMOXICILLIN
222Trimox5BBBAMOXICILLIN
333Amoxicillin7BBBAMOXICILLIN
444E.E.S.6CCCERYTHROMYCIN

 

I'm trying to populate two fields in a different table, 'sum of value' and 'running total' for values grouped by the 'std ID' so it looks like this:

 

std IDstd Textsum of valuerunning total
AAAIBUPROFEN1919
BBBAMOXICILLIN1534
CCCERYTHROMYCIN640

 

I've found answers to MANY of my questions in this forum in addition to very useful techniques that I didn't think possible, but have not found this situation addressed.

2 Replies