Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI,
Is Is Average of Average Possible in Qlikview??
I have written Two expression in a Pivot with a dimension as Salesperson and SalesOrderID
1) Avg(OrderQty)
2) sum(OrderQty)/count(SalesID)
Now in other pivot i need and average of above 2 expression with dimension as SalesPerson??
avg(sum(OrderQty)/count(SalesID)) -- THIS IS NOT WORKING
avg( Avg(OrderQty)) -- THIS IS NOT WORKING
Pls any one can suggest an solution..
Thanks in advance.
Regards.
Ankit
What are you actually trying to calculate.
An average of an average is not a sensible measure, you need a WEIGHTED average to get anything sensible.
steve
Ankit,
The only way to do this is with advanced aggregation:
avg(aggr(avg(OrderQty),SalesPerson))
Regards,
Try this syntax
avg(aggr(sum(OrderQty)/count(SalesID),SalesPerson ))
avg( aggr( avg(OrderQty), SalesPerson ))
Hope this will work
Just to reiterate what Steve Cavill stated, an average of an average should never be used as it will evaluate to a figure that is not a true average.