I have the following data:
DATE COUNTRY ITEM Value 2005-01-01 UK op_rate 30% 2005-01-01 UK proc 1000 2005-01-01 UK export 750 2005-01-01 ITA op_rate 45% 2005-01-01 ITA proc 500 2005-01-01 ITA export 350
Basically, data in normal format, which includes both ratios (the op_rate) and other items such as exported volumes and processed volumes ("proc").
I need to aggregate by SUM for "proc" and "export", but not for the "op_rate", for which I need a weighted average by "proc".
In this case the aggregated op_rate would be: 0.45*500 + 0.30*1000 = 0.35 // instead of a .75 SUM or 0.375 AVERAGE
All example I find for weighted average are across measures, but none covers using other dimensions.
>> The model is simplified -- and the data structure is fixed
Any help most welcome!