1
votes

I have an issue where i need to sort a group by another group or field but am running into problems coming up with a solution.

example data: [stock number], [sale date], [price sold], quantity sold

    red ball, 10/12/16, $13.33, 4
    red ball, 10/11/16, $13.33, 12
    red ball, 10/11/16, $12.99, 25
    red ball, 10/11/16, $13.33, 2
    red ball, 10/15/16, $13.33, 4
    green ball, 10/15/16, $12.99, 4
    green ball, 10/10/16, $12.99, 1
    green ball, 10/10/16, $13.99, 8
    green ball, 10/12/16, $12.99, 2
    green ball, 10/12/16, $12.99, 3

I have them grouped by item, but grouping by date and suppressing kills off any price changes, and grouping by price, doesn't order them in ascending dates.

the result data should look like:

    red ball
        10/11/16, $13.33, 14
        10/11/16, $12.99, 25
        10/12/16, $13.33, 4
        10/15/16, $13.33, 4
    green ball
        10/10/16, $12.99, 1
        10/10/16, $13.99, 8
        10/12/16, $12.99, 5
        10/15/16, $12.99, 4
1

1 Answers

0
votes
  1. Create a group by item
  2. Create a group by date
  3. Create a group by price
  4. Use the group (by price) header instead of details
  5. In this header, put the item, the date, the price and the sum of quantity.

(no need to suppress)