views:

29

answers:

3

I'm new to SQL Server. how can I add the values of my Pie Chart to the Legend next to the Series fields? In this case I want the percentage.

For example:

United States 43.2%
Canada 22%
etc. 
A: 

We should be knowing the exact way of calculating the 43.2 to achieve this.

For example:

Total Number of Cycles: 20 Total Number of Cycles Used : 10 Percentage of the Cycles: 10/20 * 100 = 50 %

Now I would write the expresssion to complete this Case:

=Sum(Fields!ID.Value, "Total_Number_Of_Cycles_Used") * 100 / Sum(Fields!ID.Value, "Total_Number_Of_Cycles") & "%"

"Total_Number_Of_Cycles_Used" and "Total_Number_Of_Cycles" are the two datasets created.

For some Percentages, sometimes we would not be requiring the decimals more than 2. We could achieve it by using.

=LEFT(FORMAT(Sum(Fields!ID.Value, "Total_Number_Of_Cycles_Used") * 100 / Sum(Fields!ID.Value, "Total_Number_Of_Cycles"))) & "%"

Your Query:

="United States" & Percentage Expresssion as Mentioned Above

Hope this Helped You.

Regards

GVS

GVS
A: 

In the series label properties of Chart..set #LEGENDTEXT #PERCENT{#%;;""}

Regards, Krishna

Krishna
A: 

Maybe this will help http://technet.microsoft.com/en-us/library/dd239373%28SQL.100%29.aspx check the section titled "To display percentage values in the legend of a pie chart "

Emad

related questions