In this article, we will show you how to create and configure the Indicators in SSRS. For this, We are going to use the below-shown report. Please refer to the SSRS Table Report, Data Source, and Dataset articles to understand the creation of Data Source, Dataset, and SSRS Table report.
If you observe the below screenshot, It was a regular Table report with City, Name, Job Title, Sales Last Year, and Sales Year to Date columns.
We used the Embedded Dataset for the above report, and the Dataset showed in below screenshot
SELECT [City] ,[FirstName]+' '+[LastName] AS [FullName] ,[JobTitle] ,[SalesYTD] ,[SalesLastYear] FROM [AdventureWorks2014].[Sales].[vSalesPerson]
Creating Indicators in SSRS
In this example, we will create and add the SSRS Indicator on the right-hand side of the Sales YTD, and the Indicator should satisfy the below conditions:
- If the value of Sales YTD is less than Sales Last year, then display the Red Indicator.
- Anything Greater than Sales Last Year, Display Yellow Indicator.
First, let us create an Empty column by right-clicking on the Sales YTD column. Next, select the Insert Column option and then select the Right option.
Next, Drag and drop the SSRS Indicator from Toolbox to an Empty column. When you drop the Indicator to an Empty column, a new window called Select Indicator Type will open to select required Indicators (Directional, Symbols, Shapes, and Ratings) from the available once.
In this example, we are selecting SSRS Simple Shape Indicator, as shown in the below screenshot.
Click Ok to add Indicator to a newly created empty cell. Now, we have to configure the Indicator value. First, Click on the SSRS Indicator that will open the Gauge Data window.
In this example, we want to show the Indicator for Sales YTD. So, Please drag and drop or select the Sales YTD as of the Indicator Value.
Next, we have to configure the Indicator Properties so, Right Click on the Indicator will open the context menu. Please select the Indicator Properties option from it.
Once you select the Indicator Properties option, a new window will be opened to configure the SSRS Indicator values. First, go to the Values and State tab, you can notice the default settings of the indicator values here.
By default, State Measurement Unit value is Percentage, and from 0 to 33 Red Indicators, 33 to 66 Yellow Indicator, and 66 to 100 Green Indicator. If you want to change the percentage values, you can replace the default value or else use the fx button for custom expressions.
In this SSRS Indicators example, we want to display the indicators based on Numeric values. So, Please change the States Measurement Unit value from Percentage to Numeric. We are also removing Green Indicator by selecting the Green and deleting it.
From the above screenshot, For the Red indicator, we are okay with the Start value 0. However, we have to change the End value. So, we are selecting the fx button next to End value Textbox and write the following expression.
It means, If the Sales YTD value is between 0 and Sales Last Year Value, then Red Indicator will be displayed.
Next, We are changing the Starting value of the Yellow indicator. By clicking the fx button next to the Start value Textbox and write the following expression.
Next, We are leaving the End value of a Yellow Indicator empty. It means, If the Sales YTD value is greater than Sales Last Year, then Yellow Indicator will be displayed.
Click Ok to finish configuring the SSRS Indicator properties. Let’s see the Report preview by clicking on the preview tab