WAvg (MDX+)
Compute the weighted average value over the specified set, WAvg( Set, Weight, Value ).
Parameters
Name | Type | Cardinality | Default value |
set | set-expression | one | |
weight | value-expression | one | |
value | value-expression | one |
Return
value
Description
The WAvg function calculates the weighted average value of the non-empty cells. Empty cells are ignored.
When the value expression is specified, the measure is evaluated over the set and its weighted average value is returned.
The pseudo code for this algorithm is :
Weighted Average = WAvg( Set, Weight, Value )
for each member of the set
total_weight = total_weight + weight_i
w_avg = w_avg + weight_i * value_i
wavg = wavg / total_weight
See Also
Examples
Special Examples (errors, null, ...)
XMLA Properties
Find here the value of the XMLA properties when not specified otherwise.