OWC - Rounded Value on Pie Chart

E

Exch

Hello,
I have a problem with rounded percentages on pie chart. I have noticed
a different behaviour of OWC compared with Excel. Consider this
example:

*** In Excel ***:
I have this values:
7
7
7

If I create a pie chart and I choose as label their percentages (not
the original values), the pie chart shows these results:
33%
33%
34%

Total of 100%. This is the behaviour I want.

*** Using OWC ***
The same data creates a pie with 33% 33% 33%, so the total is 99% and
not 100%.

Could you, please, suggest a solution? How can I get the same results
of Excel?
Thank you!
 
A

Alvin Bruney [ASP.NET MVP]

Rounding is not under programmer control, try adding a decimal value to
round correctly. I'm not sure if you can also look at applying a number
format - I think a good numberformat could possibly do the trick. Have a
look at numberformats in the help docs.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 
E

Exch

Rounding is not under programmer control, try adding a decimal value to
round correctly. I'm not sure if you can also look at applying a number
format - I think a good numberformat could possibly do the trick. Have a
look at numberformats in the help docs.

Thank you,
how can you explain these differences between excel and owc? The
decimal value doesn't solve the problem in all situations: it's
possibile to obtain a sum of percentages of 99.999%. I don't
understand how is possibile that people accepts this strange
behaviour... I have never seen a pie that doesn't have 100% of sum... :
(
 
L

Liviu

Exch said:
Hello,
I have a problem with rounded percentages on pie chart. I have noticed
a different behaviour of OWC compared with Excel. Consider this
example:

*** In Excel ***:
I have this values:
7
7
7

If I create a pie chart and I choose as label their percentages (not
the original values), the pie chart shows these results:
33%
33%
34%

Total of 100%. This is the behaviour I want.

So you want that one of three equal numbers displays as a higher
percentage than the other two? That's an odd expectation.
*** Using OWC ***
The same data creates a pie with 33% 33% 33%, so the total is 99% and
not 100%.

Wrong. The total _is_ 100%, it's just that the numbers are not displayed
with enough precision to show that. It is generally understood that a
number displayed as 33 represents in fact a value between 32.5 and
33.5 - unless expressly stated that it's an exact value with no hidden
decimals. In contrast, it's never expected that 33% is equal to 34%.
Could you, please, suggest a solution?

No, I wouldn't even be looking for one ;-) But if it existed, I expect
it would also have to deal with other such cases, for example that of
101 input values each equal to 1.
 
A

Alvin Bruney [ASP.NET MVP]

Good point, so OP can you use a number format to bring out the precision so
instead of 33 OP would get 33.33 with a numberformat equal to "##.##"
how can you explain these differences between excel and owc?
Although it looks like excel, it isn't exactly excel. The excel engine has
been pulled out, modified and compiled to give OWC. There are small
differences like these and others such as range manipulation and recursive
depth that are different as well.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top