0

I have been trying to create a view that will provide me with the total number of each product SKU ordered within a specified date range. Let's say there were three orders within the specified date range:

Order 101
Product ABC - Qty 1
Product XYZ - Qty 3

Order 102
Product ABC - Qty 1
Product XYZ - Qty 0

Order 103
Product ABC - Qty 10
Product XYZ - Qty 2

The View result would look something like this:

Total Number Ordered Per SKU for (date range)
Product ABC - 12
Product XYZ - 5

It is important for the results to be based on the SKU of the product, not the product title.

I have played around a bit with Views Aggregation on a "Type: Orders" view, but I am not knowledgeable enough to make it do what I need to do. Perhaps there is an easier way?

The purpose of this view will be to have an "at-a-glance" of which products need to be prepared for fulfillment, and how many of each, for the filtered date range.

Thanks!

0

I found my answer. I used the Views Aggregator Plus module (https://www.drupal.org/project/views_aggregator). I applied "Group and Compress" and "Tally Members" in the "Group Aggregation" column within the Views Aggregator Table options for the SKU field, and I applied "Sum" in the "Column Aggregation" column for the Quantity field. This provided me with the exact result I was looking for.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.