Weighted average with varying row numbersI found Byron's great example of the moving average function, but am having trouble implementing this into a data table of my own. In my table I have listed final product batches that are composes of a varying number of ingoing raw material batches. Each of the raw material batches contains a component at some concentration level and different quantities of the raw material batches are combined into a single final product batch. What I want to do is to calculate a weighted average concentration of the component in the ingoing raw material batches. To make this a little clearer I have color coded the fields for the weighted average in the screenshot below. Each color represents a single, weighted average representative of the final product batch. I have also attached the table to this posting (feel free to show me how to tweak summation directly in this column. Thank you very much in advance.).

Advanced Statistical ModelingMass CustomizationRe: Weighted average with varying row numbersGreat! Thank you - this was precisely what I needed!Re: Weighted average with varying row numbersI'm not exactly sure if this is what you mean but Col functions found under Statistical grouping in Formula editor might help.
Col Sum(
:Name("Concentration of some component in raw material batch [%]") *
:Name("Weight of Ingoing raw material batch [kg]"),
:Final product batch
) / Col Sum(:Name("Weight of Ingoing raw material batch [kg]"), :Final product batch)
