Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Problem in creating a Pie chart Expand / Collapse
Author
Message
Posted Friday, November 26, 2010 4:25 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, December 15, 2011 12:09 AM
Points: 140, Visits: 748
Hi All,

I have a table which stores values like Yes, Never and Close.

I need to display the % of each of them in a Pie chart.

my query is like:

select CONVERT(float,LC)/CONVERT(float,Total) as LC_Perc
,CONVERT(float,LY)/CONVERT(float,Total) as LY_Perc
,CONVERT(float,LN)/CONVERT(float,Total) as LN_Perc
from
(
select LC,LY,LN,LC+LY+LN as Total from
(
select sum(LessonClose) as LC,sum(LessonYes) as LY, sum(LessonNever) as LN
from Lessons
)tbl1

)tbl2


and the result set is :
LC_Perc----------LY_Perc--------LN_Perc
22%--------------18%-----------40%

I tried to plot these on the pie chart and m not getting the desired result. I get only one sector on the Pie. the other two are not mapping correctly.

Can we not display multiple columns on the same pie?

How can i solve this?

Please suggest. its bit urgent.

Thanks,
Malavika.

Please suggest something.
Post #1026731
Posted Thursday, February 7, 2013 3:05 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, December 17, 2014 3:44 AM
Points: 292, Visits: 262
Hi,

Did you manage to resolve this at all?
Or can anyone answer this?


Regards
ld

Stoke-on-Trent
United Kingdom

If at first you don't succeed, go to the pub and drink away your current thought plan.
Post #1416916
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse