• Are you doing this in SSRS? Use a Matrix... does the pivot for you.