How to find weighted average using formulate to be able to use it in reports
I am aware of several measure like sum, average being available.Can you share how i can calculate weighted average?
I have a usecase which has several such calculations and to migrate the flow to pyramid i want to be able to do that.
Weighted average is by definition Sum(weight * measure) / Sum(Weight).
So I would follow these steps:
1. create a calculated column (in the model or in formulate, the model looks more appropriate in this case as it is quite generic) that will be (weight column) * (measure column).
2. Define a measure for this column that will use sum aggregation.
3. make sure you also have a measure with a Sum aggregation for the weight column.
4. create a formula (in formulate), that will divide the measure from 2 with the measure from 3.
That should work.