It looks like you're new here. Sign in or register to get started.
This sounds like a job for the Pivot operator. Give that a try.