Search code examples
sqlreporting-servicesssrs-2008ssrs-tablixreportbuilder3.0

How to add Indicators for string values in Report Builder?


I have a report that is built on Tablix format with fields in columns and rows. There are 3 types of feedback columns in my dataset - ('Social','Security','Others'). These 3 columns are used in 3 different fields in my report. Eg.

Field 1 -> Social_feedback   (can be 'Yes' or 'No' or 'N/A')
Field 2 -> Security_feedback ( can be 'Yes' or 'No' or 'N/A')
Field 3 -> Others_feedback   ( can be 'Yes' or 'No' or 'N/A')

Each of these 3 fields can either be in 3 states 'Yes' or 'No' or 'N/A'. I want to have a Indicator fields that show these 3 states for all 3 fields.

enter image description here

When I am adding a Indicator it only provides option of Numeric or Percentage values.


Solution

  • In your dataset you need add in a calculated field (labelled as :Feedback_Score for example) for using the expression switch, for example:

    =switch(Fields!Social_feedback.Value = "Yes", "3", Fields!Social_feedback.Value = "No", "2",Fields!Social_feedback.Value = "N/A", "1")

    Then you need insert an indicator, go to properties, values and states, change the value expression to be [First(Feedback_Score), select numeric, and amend start and end values.

    For the red down arrow it start at 0 and end at 1 , for the yellow bar it would start at 1 and end at 2, for the green up arrow it would start at 2 and end at 3.