In this article, we will show you, How to create and configure the Data Bars in SSRS. For this, We are going to use below shown report.
If you observe the below screenshot, It was a normal Table report with State Name and Sales Amount columns.
-- SQL Select Statement for SSRS Data Bars SELECT Geo.EnglishCountryRegionName AS Country, Geo.StateProvinceName AS State, SUM(Cust.YearlyIncome) AS YearlyIncome, SUM(Fact.SalesAmount) AS SalesAmount FROM DimCustomer AS Cust INNER JOIN FactInternetSales AS Fact ON Cust.CustomerKey = Fact.CustomerKey INNER JOIN DimGeography AS Geo ON Cust.GeographyKey = Geo.GeographyKey GROUP BY Geo.EnglishCountryRegionName, Geo.StateProvinceName ORDER BY Country
Create Data Bars in SSRS
In this example, We will create and add the SSRS Data Bars on the right-hand side of the Sales Amount. First, Let us create an Empty column by right-clicking on the Sales Amount column and select the Insert Column option and then select the Right option as shown below.
Now, Drag and drop the Drop the Data Bars from Toolbox to the Empty column. When you drag and Drop the Data Bars from Toolbox to an Empty column, a new window called Select Data Bar Type will be opened. Use this to select the required Data Bar or Data Column from the available once.
In this example, we are selecting Simple Data Bar as shown in below screenshot.
Click Ok to add Data Bar to a newly created empty cell.
Now, we have to configure the values of a Data Bars in SSRS Report. First, Click on the Blue bar from the below screenshot will open the Chart Data window
In this example, we want to show the Sales Amount in Data Bars so, Please drag and drop or select the Sales Amount as the Chart Value.
NOTE: Please be careful when dragging the columns to values region, if you mishandled or dropped in design area will end up in mess.
Click on the Preview button to see the SSRS data bars report preview.
If you observe the above screenshot, It is providing perfect result but we are unable to identify the value represented by the SSRS Data Bar (Sales Amount in each state). To resolve these situations, We have to use the Data Labels.
First, Right click on the Blue bars and select the Show Data Labels option from the context menu to show the values.
Now, Let us format the Numbers produced by the Data labels. First, right-click on the value will open the context menu as shown in below screenshot. Please select the Series Label Properties.. option from that menu
Once you click the Series Label Properties.. option, a new window will be opened to format the series labels. Here, we are changing the numbers to currency and removing the decimal values.
Click Ok to finish formatting the SSRS data bar Data Labels. Let’s click on the Preview tab to see the Report preview.
We just used the Sorting at Tablix level to sort the data by Sales Amount in Descending Order. Let’s see the preview now
TIP: Please refer Data Bars in Matrix Reports to understand the configuration of Data Bars in Matrix Reports
Thank you For Visiting Our Blog