Author |
Topic |
Trybbe
Starting Member
27 Posts |
Posted - 2009-10-27 : 04:58:52
|
HiHow do I get my chart axis to display percentages from 1% to 100% currently my chart shows 100% to 1000%I tried to tried to set the axis properties to P1 , P0 or just P. but I getting no joyPlease help |
|
JCirocco
Constraint Violating Yak Guru
392 Posts |
Posted - 2009-10-27 : 07:54:41
|
Can you show a sample of the actual data? Can you create a new calculated value in SQL that divides by 100 and uses that?JohnIt's a small world (but I wouldn't want to paint it) |
|
|
Trybbe
Starting Member
27 Posts |
Posted - 2009-10-27 : 08:08:48
|
quote: Originally posted by JCirocco Can you show a sample of the actual data? Can you create a new calculated value in SQL that divides by 100 and uses that?JohnIt's a small world (but I wouldn't want to paint it)
Hi JohnThe code behind the chart is :Declare@EndPeriod Numeric(18,0),@StartPeriod Numeric(18,0)Set @EndPeriod = 200909Set @StartPeriod = substring(convert(varchar(6), @EndPeriod),1 , 4) + '01'BeginSelect x.race, x.period,Calc = Round(Convert(Float, hires + terminations) / Headcount*100,2),Headcount, Terminations, Hiresfrom ( Select Headcount = case when sum(case when Headcount ='Headcount' then 1 else 0 end)= 0 then 0 else sum(case when Headcount ='Headcount' then 1 else 0 end)end, Hires = case when sum(case when Headcount = 'NewHire' then 1 else 0 end) = 0 then 0 else sum(case when Headcount = 'NewHire' then 1 else 0 end) end, Terminations = case when - sum(case when Headcount = 'Termination'then 1 else 0 end) = 0 then 0 else - sum(case when Headcount = 'Termination'then 1 else 0 end) end, dt.Race, dt.Period FROM DTIHeadcount dt inner join ReportingStructure R ON dt.CostCenter = R.CostCenter Where dt.Period between @StartPeriod and @EndPeriod and dt.staffno is not null and dt.race not like 'sa%' Group By dt.Race, dt.Period) xOrder By x.PeriodEND |
|
|
JCirocco
Constraint Violating Yak Guru
392 Posts |
Posted - 2009-10-27 : 08:38:44
|
Which is the field that you are graphing? Can you post what some of the sample values created by your SQL would be?JohnIt's a small world (but I wouldn't want to paint it) |
|
|
Trybbe
Starting Member
27 Posts |
Posted - 2009-10-27 : 09:06:41
|
values = Sum(Fields!Calc.Value)chart1_CategoryGroup1 = Fields!Period.Valuechart1_SeriesGroup1 = Fields!Race.Value |
|
|
JCirocco
Constraint Violating Yak Guru
392 Posts |
Posted - 2009-10-27 : 09:18:48
|
Trybbe, Sorry I was not clearer. Can you also post what the sample data for "Sum(Fields!Calc.Value)" would be?JohnIt's a small world (but I wouldn't want to paint it) |
|
|
JCirocco
Constraint Violating Yak Guru
392 Posts |
Posted - 2009-10-27 : 10:18:32
|
Very odd, even though the attachment does not come over I suspect that the problem is only in the Chart formatting but for the life of me I cannot figure where to look.JohnIt's a small world (but I wouldn't want to paint it) |
|
|
JCirocco
Constraint Violating Yak Guru
392 Posts |
Posted - 2009-10-27 : 10:34:28
|
Just created a simple bar chart with your race, period and calc data and at first did not display the negatives. I changed the Y axis to not default to start at 0 and it shows the values properly (or at least I think they are...)JohnIt's a small world (but I wouldn't want to paint it) |
|
|
Trybbe
Starting Member
27 Posts |
Posted - 2009-10-28 : 02:54:57
|
Hi JohnThanks for all your help. I'm about to start singing "I can see clearly now the rain is gone".Problem resolved. |
|
|
JCirocco
Constraint Violating Yak Guru
392 Posts |
Posted - 2009-10-28 : 06:44:54
|
Trybbe, What ended up being the problem?JohnIt's a small world (but I wouldn't want to paint it) |
|
|
Trybbe
Starting Member
27 Posts |
Posted - 2009-10-28 : 07:21:57
|
Hey JohnI just had to set the intervals for the Major Gridlines and I set the scale to minimum -.9 and maximum .9 |
|
|
JCirocco
Constraint Violating Yak Guru
392 Posts |
Posted - 2009-10-28 : 08:21:01
|
Very good, glad to help.JohnIt's a small world (but I wouldn't want to paint it) |
|
|
|