# Average product quantity (orders)

**URL:** <https://community.piwik.pro/t/average-product-quantity-orders/3319>\
**Category:** Reports and working with data\
**Created:** [December 4, 2023, 4:54pm UTC](https://community.piwik.pro/t/average-product-quantity-orders/3319 "2023-12-04T16:54:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AudreyR](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@AudreyR](https://community.piwik.pro/u/AudreyR)\
**Post date:** [December 4, 2023, 4:54pm UTC](https://community.piwik.pro/t/average-product-quantity-orders/3319/1 "2023-12-04T16:54:40Z")

</div>

Hi team,  
I just have a question regarding the metric **Average product quantity (order)**  
In my ecommerce reports, I look at this metric but can’t understand the displayed result.

Let’s say I have :

- 3967 orders
- 12843 products sold for those orders

**Average product quantity (order)** show 1,15 instead of 3,2 (products/orders).  
How is Piwik getting 1,15 ? Can someone explain ?

Many thanks 🙂

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [December 8, 2023, 10:12am UTC](https://community.piwik.pro/t/average-product-quantity-orders/3319/2 "2023-12-08T10:12:20Z")

</div>

Hi @AudreyR,

Product quantity is a number of the same product in a cart.  
For example:  
Order 1:  
2 x Item A  
1 x Item B  
1 x Item C  
Order 2:  
1 x Item A  
1 x Item B  
1 x Item C

Average product quanitity is: sum of quanitities per product / sum of product orders  
**(2+1+1+1+1+1)/6 = 7/6**  
while what you are looking for is more of a: sum of quantities per product / orders  
**(2+1+1+1+1+1)/2 = 7/2**  
You can create this type of value in calculated metrics this way:  
`{product_quantity,transformation_id=sum,event_type=9}/{ecommerce_conversions}`

Best,  
Oliwer
