Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Best Solution to "Pivot" Data in an SSRS Report

$
0
0

I have the following data columns coming into an SSRS 2008 report:

Student Name
Test Name
Test Score

When I'm constructing my query, it displays the data like so:

Student 1   Test 1    80
Student 1   Test 2    93
Student 1   Test 3    78
Student 2   Test 1    95
Student 3   Test 1    88
Student 3   Test 2    77

I think I'm overthinking this...but so far I've hit a snag with every direction I've tried to take the report.  Ultimately I want the report to look like this:

Student Name   --  Test 1   ---  Test 2 --- Test 3

 Student 1                80              93            78
 Student 2                95
 Student 3                88              77

The obvious answer seemed to be to do a column group on the Test Name; which works until you try to export the data into a csv file, and then it reverts back to showing the data in the original query format.

I've looked, but I don't see any type of pivot function for MDX (this is cubed data). 

I tried creating a Test Name column for each test, which right off the bat is a bad idea, but even so couldn't get this to work -- I was trying switches and iif statements to get the right score to display, but all it would do is overwrite the test score with whichever test is the last one to come through for that student.

Is there an obvious solution here that I'm completely overlooking?


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>