Aggregate / Generate Attribute - merge and sum up multiple example rows

Stone443
Stone443 New Altair Community Member
edited November 5 in Community Q&A
Dear Ladies and Gentlemen,

I would like to sum up my Data row values per date for each item, in order to have only one row per date with the total quantity data ("Menge kg") for the individual item.

Varying prices ("Preisherkunft") exist, which has resulted in multiple entries for the same item ("Artikel-Nr", "Artikelbezeichnung") on a date.


The situation is illustrated in an excerpt of an anonymized version of the table in the appendix.

In the example table, I would like to merge the two product rows into one on the date 06.10.2016, for example, and add up the quantities.

By using the "Aggregate" operator to sum up the quantity kg attribute, I was able to obtain the desired result for a single item.

Now I would like to process several articles in one data set with the same function in order to be able to visualize them afterwards. 
Therefore I considered the "Generate Attribute" operator, where one could possibly arrive at the solution by means of "article description==article description" or similiar function expressions


.

So far, I have unfortunately not found a suitable function for the solution of my problem and am therefore grateful for any advice.


Best regards

Best Answer

  • MartinLiebig
    MartinLiebig
    Altair Employee
    Answer ✓
    Hi,
    this sounds like you want to group by Bondatum? That would give you then a table like:

    Bondatum, sum(Bonmenge)
    06.10.2016, 1.55
    07.10.2016, 0.42

    etc. Is that what you need?

    Cheers,
    Martin

Answers

  • MartinLiebig
    MartinLiebig
    Altair Employee
    Answer ✓
    Hi,
    this sounds like you want to group by Bondatum? That would give you then a table like:

    Bondatum, sum(Bonmenge)
    06.10.2016, 1.55
    07.10.2016, 0.42

    etc. Is that what you need?

    Cheers,
    Martin
  • Stone443
    Stone443 New Altair Community Member
    Hey Martin,

    thanks for your input, I totally forgot about the group by attribute function in the aggregate operator, that's what I have been looking for.

    Thanks a lot!



    Best Regards

    S