Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Average Order Quantity Calculation

II have no clue how to calculate the value for: Average Order Quantity per Period or per SalesPerson.

I have the Nr of Orders, OrderItems, the Quantity per Item.

i.e.

Jul/2006: Mr. Bond: has made 4 Orders, 29 Order-Items and Quantity of 51

Is the Average: sum(Sales.OrderQuantity) / (count((SalesOrderNr)) / count(distinct((SalesOrderNr))))) ?

2 Replies
Oleg_Troyansky
Luminary Alumni
Luminary Alumni

You would typically have "Period" or "SalesPerson" as your chart dimension, and in that case, the average Order Quantity would be:

sum(Sales.OrderQuantity) / count(distinct SalesOrderNr)

Not applicable
Author

Thanks, that helped.

However, I needed on Order Item Level, means: sum(Sales.OrderQuantity)/Count(Sales.OrderNr).
Distinct is in this case not good, it would reduce from Oder-Detail to Oder-Header.