Search code examples
reporting-servicesssrs-2008ssrs-2008-r2ssrs-2012ssrs-tablix

SQL Report Builder for Survey Data


I have a large dataset with People's names and their Rating from 1 to 5. Then I made a query that summarizes this data for PersonA:

Rating   Count
-------  ------
 1        4
 2        6
 3        1
 4        0
 5        2

I just need to know how to show this on my report. I have made a cell for each rating and need to put in an expression that says "If Rating=1, show count for rating 1".

I tried using =IIf(Fields!Rating.Value = 1, Fields!Count.Value, 0) but this didn't work.


Solution

  • I'm not sure why you would need an expression like that, based on your description of the dataset it sounds like you already have two columns of data for rating and count, so you could use a tablix (table), with columns:

    Rating   Count
    

    which would list all the rating values and associated count values, similar to the example result in your question.