Hello,
I am trying to write a GI to get the customer’s sold since information like the below screen.
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/8f2f5e17-735a-4450-8263-d43c3c4cbcf0.png)
You can find my share in the below post:
My solution almost works fine, but I find it difficult to get the “last sale qty” and “last sale price” by item using GI.
The last sales date can be got because the default aggregation is MAX, the max date is exactly the last date.
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/6bebeefe-612f-43c6-97ab-f7a2a589329b.png)
However, the max(orderqty) is not the last order qty, and also the max(unit price) is not the last unit price.
so currently, I am using the AVG unit price and Sum Order qty as a workaround, and it can be accepted by user.
But still, I am eager to learn how can I get the data using a single GI?
Thank you.