How to create a new row with aggregated values?

Hi everyone
i have this table:
table1
and i need this data in new table, where all the same rows are summarized as sum but as one row.
If row Pnm has two or more values the same, i need them as one output to new table and the rows within this values are summarized as sum.
example of new table:
Pnm / Material / Rozmer / Pocet ks materialu
51022005 Palety 1200x800 30
51022110 OSB 1160x800 20

I have a button to send this into new table but i cant get rows summarized and also cant get the new rows created when i hit the button.

If u dont understand my bad english i can share my doc but its in other language.

Thx for help

@Tomas_Sebes

Play around with this and see if it gives you some ideas:

2 Likes

Ander’s solutions look good.
Here is also some examples of doing summary and aggregates that don’t involved buttons or creating a new table as such

1 Like

Hi @Ander and @mallika
Thx for helping me.
I think u need to take a look on my doc.

Section Objednavka is where i want to make my orders - the first table “Objednavka materialu” is just one row table where im getting data from master table which is cross doc table and is located in section “Data”. If u change column"Cislo zakazky" and also column “Typ” in table “Objednavka materialu” it is going to fetch data from master table and fill other columns.
Under that table i have three buttons - the green one(button4) is just pushing the other two “X Nepouzivat”. The red one(button1) is pushing data to other table “Objednany material”. Every time i push that button he creates a new row in that table. The last one button(button5) which is not working now should send data to table “Objednavka” in section “Email”. This button shoul do all that summing. I think. :slight_smile:

In table “Objednavka” i need all data from table “Objednany material” but only once and summarized.

As u can see now in table “Objednany material” there are some data but they repeat. Thats ok.
And that data needs to be summarized by all the columns and send to table Objednavka.

Pls try it out and when something is unclear i will try rly hard, explain it to you.

Thx again
Tomas

@Tomas_Sebes

The doc you posted doesn’t grant editing access, so I can’t copy it or see your formulas. (If you grant editing access, I’ll take a deeper look.)

I realized that neither did the doc I posted grant editing access, so you probably couldn’t see those formulas either! :stuck_out_tongue_winking_eye:

I just gave that doc editing access, so now you should be able to review the formulas. Based on the doc you posted and your explanation of how it should work, it appears that the general principle illustrated in the sample doc I posted should transfer to your use case.

Hi @Ander u can try now.
I just want send data from “Objednany material” to other table via button, and that data should be combined by Pnm which is unique ID and the “pocet ks materialu” must be summarized.

Thx

Closing the as solved with the help of @Tepp_Agent
Dont ask me how he solved it but he did fantastic job.
i can share with everyone the doc when you leave a message here or PM.

1 Like