Skip to Content
avatar image
Former Member

SUM column for DISCTINCT values in another column

Say I have two columns, one with part numbers and one with $ values

How do I sum the $ column for only distinct values in the part number column

So if I have:

PartNo-----$ Value

10425.1-----$50

10425.1-----$50

10425.2-----$75

I want a total to say $125, only summing 10425.1 value once

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Mar 24, 2017 at 11:10 PM

    Right-click the Value and select > Insert > Running Total

    Type of Summary should be SUM

    In Evaluate section select "On Change of field" and add the "PartNo" to the box

    Click OK

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 24, 2017 at 09:27 PM

    Anyone?????

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 25, 2017 at 08:07 AM

    Hey Mr. Wagner,

    So do you want to do this while fetching your data from the Database Table or just from an internal table in your program?

    If it is while querying from Database table, just look up 'SUM' keyword in 'SELECT'. If it is from internal table, follow the answer given by Mr. Vitaly Izmaylov.

    Best

    Ilakkiaraj S

    Add comment
    10|10000 characters needed characters exceeded