Thanks to Scott and Taras for pointing me to the crosstab functions. I only had a quick look but they seem very helpful!
Kind regards,
Felix