Showing posts with label reading. Show all posts
Showing posts with label reading. Show all posts

Friday, March 9, 2012

Format Y axis label as percentage

I have entered the code as P0 when formatting my Y axis to show 0% to 100%. This showed me percent values as 0% to 10,000%. Then after reading the forums I put the major gridline interval as 0.2 to get jumps of 20% but this just puts a lot of lines on the chart as 0,0.2,0.4 till 10,000%.

How can i fix this one ..

Thanks

Kiran

Kiranvukkadala wrote:

I have entered the code as P0 when formatting my Y axis to show 0% to 100%. This showed me percent values as 0% to 10,000%. Then after reading the forums I put the major gridline interval as 0.2 to get jumps of 20% but this just puts a lot of lines on the chart as 0,0.2,0.4 till 10,000%.

How can i fix this one ..

Thanks

Kiran

Have you set the minimum value on the scale to zero and the maximum value on the scale of the Y-axis to 100?

|||

Yes I have done so. I have tried removing that too

No luck

|||

Possibly the issue is your data. What is the maximum value of your data? Have you divided this into your field?

For example, if you try to display change as a fraction of a dollar:

Then one penny should be 1% of a dollar. To get 1%, you take 1/100 = .01 (1%)

If you didn't divide by 100, however, then one penny would be 1.00 (100%).

A dime would be 1000% and so on.

One dollar would be BEHOLD 10000% (There's that 10000 percent).

Most likely you have just put the field as raw data, not as a percentage and expected the format expression to do the division for you.

Try dividing by 100!!!!

|||

I have got a stacked chart and on the data fields I have put in 2 fields

% received and % latewhic combine together to give 100%.

The data points is actuallys et to give teh actual counts of these fields.

So would this count as raw data?

If I divide this percentage number by 100 it goes really small on the graph but the scale remains the same. How can I modify the scale.

I appreciate the time.

Kiran

|||

Oh I thought you were saying your data was going to 10,000%. Try changing your Y-scale to a minimum of zero and maximum of 1.

|||

Thanks for the replies.

I have tried that possibility too. This option is successfull in creating the axis from 1% to 100% but the data itself goes wrong. There is no split between the received and late numbers and its either 100% received or 100% late. I dont know why it does that. My assumption is that since maximum value of 1 is specified only the first 1% of the data is displayed.

Kiran

Friday, February 24, 2012

format data before being inserted into a column

I am trying to manipulate data before it is inserted into a column. For
instance
I am reading in a MAC addreess which looks like '00DE0B16AA99' and when I
do an insert into the column I want it to be '00:DE:0B:16:AA:99' In other
words I am trying to insert the semicolons. I thought I was on to something
with the sp_bindrule but have not had sucess with it yet. I am pretty sure
that you can set up some sort of formattting on a column maybe when creating
the table but have not figured it out. Any help is appreciated.
Thanks in Advance
DaveProbably you can create a User Defined Function (named MyFunction, that
takes a string as parameter and generates a string as result) in that SQL
database, in order to convert the string from
00DE0B16AA99
to
00:DE:0B:16:AA:99
I think that a SQL sentence like
Insert into TABLE values (... MyFUnction('00DE0B16AA99')
and MyFUnction should be like:
CREATE FUNCTION dbo.MyFunction (@.MAC varchar(12))
RETURNS varchar(17)
AS
BEGIN
declare @.NEWMAC varchar(17)
...
...your conversion code here
...
return (@.NEWMAC)
END
Hope it helps
Michael Prendergast
"deheinz1" <deheinz1@.discussions.microsoft.com> escribi en el mensaje
news:8F622015-658D-4C83-8F85-6B4797FB78AE@.microsoft.com...
>I am trying to manipulate data before it is inserted into a column. For
> instance
> I am reading in a MAC addreess which looks like '00DE0B16AA99' and when I
> do an insert into the column I want it to be '00:DE:0B:16:AA:99' In other
> words I am trying to insert the semicolons. I thought I was on to
> something
> with the sp_bindrule but have not had sucess with it yet. I am pretty
> sure
> that you can set up some sort of formattting on a column maybe when
> creating
> the table but have not figured it out. Any help is appreciated.
> Thanks in Advance
> Dave
>

format data before being inserted into a column

I am trying to manipulate data before it is inserted into a column. For
instance
I am reading in a MAC addreess which looks like '00DE0B16AA99' and when I
do an insert into the column I want it to be '00:DE:0B:16:AA:99' In other
words I am trying to insert the semicolons. I thought I was on to something
with the sp_bindrule but have not had sucess with it yet. I am pretty sure
that you can set up some sort of formattting on a column maybe when creating
the table but have not figured it out. Any help is appreciated.
Thanks in Advance
Dave
Probably you can create a User Defined Function (named MyFunction, that
takes a string as parameter and generates a string as result) in that SQL
database, in order to convert the string from
00DE0B16AA99
to
00:DE:0B:16:AA:99
I think that a SQL sentence like
Insert into TABLE values (... MyFUnction('00DE0B16AA99')
and MyFUnction should be like:
CREATE FUNCTION dbo.MyFunction (@.MAC varchar(12))
RETURNS varchar(17)
AS
BEGIN
declare @.NEWMAC varchar(17)
...
...your conversion code here
...
return (@.NEWMAC)
END
Hope it helps
Michael Prendergast
"deheinz1" <deheinz1@.discussions.microsoft.com> escribi en el mensaje
news:8F622015-658D-4C83-8F85-6B4797FB78AE@.microsoft.com...
>I am trying to manipulate data before it is inserted into a column. For
> instance
> I am reading in a MAC addreess which looks like '00DE0B16AA99' and when I
> do an insert into the column I want it to be '00:DE:0B:16:AA:99' In other
> words I am trying to insert the semicolons. I thought I was on to
> something
> with the sp_bindrule but have not had sucess with it yet. I am pretty
> sure
> that you can set up some sort of formattting on a column maybe when
> creating
> the table but have not figured it out. Any help is appreciated.
> Thanks in Advance
> Dave
>