Summing up max values

Hi Tim,

thank you for your reply. It was very helpful and solved my question!

As a side quest, i wonder would it be possible to split also without specifying the top-n number for the groups? If my device number is increasing constantly at unpredicted level, how I proceed then?

best,
Emil