Please help, Data grouping, calculating total and maximum values
Posted: 08 Apr 2024, 06:55
Data format:
To achieve:
When the first column is grouped by the same value, calculate the maximum value in the second column and the total value in the third column for each group after grouping
Result:
Is there any good solution? thanks
[Mod edit: Added [code][/code] tags for better overview.]
Code: Select all
Aaa 1 2.02
Aaa 6 32.1
Bbb 9 23.2
Bbb 4 332.0
CCC 5 232.0
Ddd 9 22.08
Ddd 1 12.78
Ddd 2 45.34
Eee 0 456
When the first column is grouped by the same value, calculate the maximum value in the second column and the total value in the third column for each group after grouping
Result:
Code: Select all
aaa 6 35.12
Bbb 9 355.2
CCC 5 232.0
Ddd 9 80.2
Eee 0 456
[Mod edit: Added [code][/code] tags for better overview.]