cancel
Showing results for
Did you mean:
Frequent Visitor

## Need to calculate weighted average based on derived values.

Hi All,

There is a scenario as:

 Input Data Question category Question Rating A1 Q1 1 A1 Q1 1 A1 Q1 1 A1 Q1 2 A1 Q1 2 A1 Q1 2 A1 Q1 3 A1 Q1 3 A1 Q1 3 A1 Q1 3 A1 Q1 0 A1 Q1 0 A1 Q2 1 A1 Q2 1 A1 Q2 2 A1 Q2 2 A1 Q2 2 A1 Q2 2 A1 Q2 3 A2 Q1 3 A2 Q1 3 A2 Q1 3 A2 Q1 4 A2 Q1 4 A2 Q1 4 A2 Q2 0 A2 Q2 0 A2 Q2 1 A2 Q2 1 A2 Q2 2 A2 Q2 2 A2 Q2 2 A2 Q2 2

Calculation and output will be like below:

 Output Calculation Rating Weight Calculation Final Output A1 Q1 1 3 1*3=3 3+6+12/10 A1 Q1 2 3 2*3=6 A1 Q1 3 4 3*4=12 A1 Q1 0 0 A1 Q2 1 2 1*2=2 2+8+3/7 A1 Q2 2 4 2*4=8 A1 Q2 3 1 3*1=3 A2 Q1 3 3 3*3=9 9+12/6 A2 Q1 4 3 4*3=12 A2 Q2 0 0 0 A2 Q2 1 2 1*2=2 2+8/6 A2 Q2 2 4 2*4=8
Super User IV

@kirti_agarwal28 , Try a measure like

divide(calculate(sum(Table[Rating]), filter(Table, Table[Rating]>0)),calculate(count(Table[Rating]), filter(Table, Table[Rating]>0)))

Proud to be a Super User!

Announcements