Weighted column in a cross table
In a cross table I want to add a column labeled as “Weighted Days On hand” based on the Quantity
This is how it must be calculated:
- Sum([Weight Quantity On Hand]) * Sum([Days on Hand])
However the first part (Weight) needs to be the % of the total according with the filters applied.
The expression to have this % of the total is:
- Sum([Quantity On Hand]) THEN [Value] / Sum([Value]) OVER (All([Axis.Rows]))
So then I need modify the expression (1) introducing the (2), something like this
(Sum([Quantity On Hand]) THEN [Value] / Sum([Value]) OVER (All([Axis.Rows]))) * Sum([Days on Hand])
But it send it an error on the expression, Someone can help me to have the right expression?
I Noticed the red color on [Value] that indactes the expression has an error.