How to percentage and count in SSRS Pie Chart
Asked Answered
M

3

11

I have a Pie chart generated using SSRS. I would like to Show both Count and percentage in the Pie chart.

Right now, I am able yo show the count in pie charts as well as in the report.

I want to show the name of the partition and also the percentage directly pointed out.

Example :

ALD 38% 56

please help me withe properties to do it.

I'm using VS 2008

Miniature answered 30/10, 2014 at 5:39 Comment(0)
B
10

write down an expression on series label data like -

=Sum(Fields!DATA.Value, "Chart1_SeriesGroup1") & "("  
    &  Sum(Fields!DATA.Value, "Chart1_SeriesGroup1")  * 100 /Sum(Fields!DATA.Value, "DataSet1") 
    & "%)"

Here Chart1_SeriesGroup1 is the group name if you look at series group setting

enter image description here

Here DataSet1 is the name of Dataset

Here is the final output

enter image description here

Cheers :-)

Bug answered 30/10, 2014 at 7:4 Comment(6)
Is there a way to set the percentage's decimal spaces to a maximum of 2.Miniature
try this in expression =Sum(Fields!DATA.Value, "Chart1_SeriesGroup1") & "(" & Format(Sum(Fields!DATA.Value, "Chart1_SeriesGroup1") * 100 /Sum(Fields!DATA.Value, "DataSet1"),"#0.00") & "%)"Bug
Great.! Thanks I want the percentages of pie chart to be displayed in the Chart as the image you have shown. But that information is being displayed on Legend. I want to hide legend ans show name count and percentage on the chart itself, Like Sales 120 (60% )My last question for the day..Miniature
sorry, i did not get exactly, i think you mean to display series name along with value .. try this =Fields!Series.Value & " " & Sum(Fields!DATA.Value, "Chart1_SeriesGroup1") & "(" & Format(Sum(Fields!DATA.Value, "Chart1_SeriesGroup1") * 100 /Sum(Fields!DATA.Value, "DataSet1"),"#0.00") & "%)"Bug
just right click on series & choose option "series group properties " & then write same expression (sent above) in labelBug
Thank You. I wrote the same expression on Series Label Properties. It worked.Miniature
T
20

1-right click on chart and select "show data label"

enter image description here

2-right click on label an select "series label properties"

enter image description here

3- general -> label data -> set this value = "#PERCENT (#VALY)" enter image description here

4- it will be like this screenshot

enter image description here

Triphylite answered 1/8, 2017 at 6:55 Comment(2)
This should be the top answer.Sharpeared
More information on the key words available to us in charts here: learn.microsoft.com/en-us/sql/reporting-services/report-design/…Broyles
B
10

write down an expression on series label data like -

=Sum(Fields!DATA.Value, "Chart1_SeriesGroup1") & "("  
    &  Sum(Fields!DATA.Value, "Chart1_SeriesGroup1")  * 100 /Sum(Fields!DATA.Value, "DataSet1") 
    & "%)"

Here Chart1_SeriesGroup1 is the group name if you look at series group setting

enter image description here

Here DataSet1 is the name of Dataset

Here is the final output

enter image description here

Cheers :-)

Bug answered 30/10, 2014 at 7:4 Comment(6)
Is there a way to set the percentage's decimal spaces to a maximum of 2.Miniature
try this in expression =Sum(Fields!DATA.Value, "Chart1_SeriesGroup1") & "(" & Format(Sum(Fields!DATA.Value, "Chart1_SeriesGroup1") * 100 /Sum(Fields!DATA.Value, "DataSet1"),"#0.00") & "%)"Bug
Great.! Thanks I want the percentages of pie chart to be displayed in the Chart as the image you have shown. But that information is being displayed on Legend. I want to hide legend ans show name count and percentage on the chart itself, Like Sales 120 (60% )My last question for the day..Miniature
sorry, i did not get exactly, i think you mean to display series name along with value .. try this =Fields!Series.Value & " " & Sum(Fields!DATA.Value, "Chart1_SeriesGroup1") & "(" & Format(Sum(Fields!DATA.Value, "Chart1_SeriesGroup1") * 100 /Sum(Fields!DATA.Value, "DataSet1"),"#0.00") & "%)"Bug
just right click on series & choose option "series group properties " & then write same expression (sent above) in labelBug
Thank You. I wrote the same expression on Series Label Properties. It worked.Miniature
M
1

In the label Properties type "#PERCENT" in Label Data

This can be used on its own or in conjunction with the other value itself by adding "#PERCENT(#VALY)"

Place this in quotes if you are trying to concat other values with it. For instance, this would show the label with the accompanying percent below

=First(Fields!Data.Value, "Chart_Group") & vbcrlf & "#PERCENT"

Where "Chart_Group" is the name of the grouped on field

Memo answered 1/12, 2020 at 21:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.