Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Axis Properties

Author  Topic 

Trybbe
Starting Member

27 Posts

Posted - 2009-10-27 : 04:58:52
Hi

How 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 joy

Please 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?

John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page

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?

John
It's a small world (but I wouldn't want to paint it)




Hi John

The code behind the chart is :

Declare
@EndPeriod Numeric(18,0),
@StartPeriod Numeric(18,0)

Set @EndPeriod = 200909
Set @StartPeriod = substring(convert(varchar(6), @EndPeriod),1 , 4) + '01'


Begin

Select x.race, x.period,
Calc = Round(Convert(Float, hires + terminations) / Headcount*100,2),
Headcount, Terminations, Hires
from (
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) x
Order By x.Period

END
Go to Top of Page

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?

John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page

Trybbe
Starting Member

27 Posts

Posted - 2009-10-27 : 09:06:41
values = Sum(Fields!Calc.Value)
chart1_CategoryGroup1 = Fields!Period.Value
chart1_SeriesGroup1 = Fields!Race.Value
Go to Top of Page

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?

John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page

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.

John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page

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...)


John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page

Trybbe
Starting Member

27 Posts

Posted - 2009-10-28 : 02:54:57
Hi John

Thanks for all your help. I'm about to start singing "I can see clearly now the rain is gone".

Problem resolved.
Go to Top of Page

JCirocco
Constraint Violating Yak Guru

392 Posts

Posted - 2009-10-28 : 06:44:54
Trybbe, What ended up being the problem?

John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page

Trybbe
Starting Member

27 Posts

Posted - 2009-10-28 : 07:21:57
Hey John

I just had to set the intervals for the Major Gridlines and I set the scale to minimum -.9 and maximum .9
Go to Top of Page

JCirocco
Constraint Violating Yak Guru

392 Posts

Posted - 2009-10-28 : 08:21:01
Very good, glad to help.



John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page
   

- Advertisement -