Multiple labels on bar chart

Multiple labels on bar chart

I’m building a “dashboard” in SSRS that updates every minute to show the results of a particular horse race. One area on the page displays a bar chart as below.


I needed to display the number as a data label (which was simple enough) but I further needed to show the percentage of the total in the same label. To achieve this you need to first right click the series in your chart and select Show Data Labels before clicking Series Label Properties.


Now write a custom expression for the label data, adding the field and the percentage calculation as you need. The screenshot below shows my expression which includes formatting the first number to have a thousands comma and the second number calculated against another dataset, rounded to two decimal places, multiplied by 100 with a % symbol to represent percent of total.


 & " ("
 & ROUND(Fields!thecount.Value 
   / SUM(Fields!s_metric1.Value, "DataSet2"),2)*100
 & "%)"

I hope this helps!


Australian. Sport. Passionate Cricket Fan. Go Pro. Abseiling. Snorkeling. Travel. Golf R. SQL Server Developer. Three sons. One daughter. Last Trip: New York.

Related Posts
Leave a comment

Your email address will not be published. Required fields are marked *