This topic contains 1 reply, has 0 voices, and was last updated by dmashburn3 8 years, 2 months ago.

  • Author
    Posts
  • #5145

    robkozak

    Hi there,

    From the table of results below i am trying to calculate the total number of items within the groups included, for example. I need to get to the result of 8+4 =12 within a saved search summary.

    Name
    Group
    item
    No. of items in group
    Quantity Sold

    Customer1
    Prod1
    Item1
    8
    1

    Customer1
    Prod1
    Item2
    8
    1

    Customer1
    Prod1
    Item3
    8
    1

    Customer1
    Prod1
    Item4
    8
    1

    Customer1
    Prod2
    Item1
    4
    1

    Customer1
    Prod2
    Item2
    4
    1

    Customer1
    Prod2
    Item3
    4
    1

    Summary of results would include: Name
    No. of Items in group
    Quantity Sold

    Customer1
    12
    7

    Any help appreciated with this

    Thanks
    This is a cached copy. Click here to see the original post.

  • #5146

    dmashburn3

    SUM(SELECT DISTINCT No. of items in group) perhaps? SELECT DISTINCT is a SQL function that should work for pulling out those individual values.

You must be logged in to reply to this topic.