Reports Sorted by quantity

Hello,

I’d like to know if it is possible to create an Item Sales report sorted by the quantity of the product sold, as opposed to the total cash value amount.

Thanks!

Easy, just take off the .dec on the total sales field and put on the qty field…

@JTRTech On the standard template it is as follows:

 [Sales:5, 2, 2,1]
@{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Sum.desc:(ODI=True):{0}:,}
>{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and O.MenuItemName="$1"}
{REPORT ORDER DETAILS:'     '+[O.PortionName],O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and O.MenuItemName="$1":2}

so I guess you suggest it should be:

[Sales:5, 2, 2,1]
@{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Sum.desc:(ODI=True):{0}:,}
>{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum:(ODI=True) and     O.MenuItemName="$1"}
{REPORT ORDER DETAILS:'     '+[O.PortionName],O.Quantity.Sum.desc,O.ExactTotal.Sum:(ODI=True) and O.MenuItemName="$1":2}

If so, On the preview and print out it does not appear to sort correctly.

I really appreciate the help

Arrr ok, because there is not qty field on the product line it’s ordering portions by qty under products by sales…
How are you using portions?
Either report portions alone ungrouped by product or add qty to product list and sort that too, but then if you sold 1000 of one portion and 1 of another the 1 portion would show under the 1000 with 1001 products with next line being say 999 portions of the next product, if that makes sence.

Thanks a lot! That was just what I was looking for :smiley:

As I said it depends on how you utilize portions though and what you aim to achive.
You could end up with

Curry 1650

  • Chicken 750
  • Lamb 650
  • Beef 250
    Soup 1500
  • Tomato 1400
  • Chicken 100

If your looking for you biggest seller it would be tomato soup at almost twice chicken curry. Although curry total is more. Or similarly it would be enlivenment of size ie 100 large red wines would come in below 101 small white wines although by volume you had sold around twice as much red.
Just bear in mind depending on how you re looking at it and how portions have been used.
Might want to look at listing purly by portions ungrouped by product.

I thought this Group/Item Sales Report was included by default?

[Group Sales by Amount:2, 1, 1]
{REPORT ORDER DETAILS:O.ItemGroup,O.ExactTotal.Percent.desc,O.ExactTotal.Sum}
>Total||{REPORT ORDER DETAILS:O.ExactTotal.Sum}

[Group Sales by Quantity:2, 1, 1]
{REPORT ORDER DETAILS:O.ItemGroup,O.Quantity.Percent.desc,O.Quantity.Sum}
>Total||{REPORT ORDER DETAILS:O.Quantity.Sum}

[Item Sales by Amount:2, 1, 1]
{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Percent.desc,O.ExactTotal.Sum}
>Total||{REPORT ORDER DETAILS:O.ExactTotal.Sum}

[Item Sales by Quantity:2, 1, 1]
{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Percent.desc,O.Quantity.Sum}
>Total||{REPORT ORDER DETAILS:O.Quantity.Sum}