Example:
KPI_A: 0% (weight 1)
KPI_B: 90% (weight 2)
KPI_C: NULL (weight 1)
-> Expected outcome: 60% (2*0,9+1*0)/3
KPI_A: 0% (weight 1)
KPI_B: 90% (weight 2)
KPI_C: 0%(weight 1)
-> Expected outcome: 45%
However all I came up with is:
((KPI_A*1)+(KP_B*2)+(KPI_C*1))/4 which is resulting in NULL if any of the KPIs is NULL.
I could sove is using extensive nested CASE WHENs catching every possible combination but that seems quite cumbersome and hard to read/maintain. Does anyone have a better appraoch or PQL function I am missing?