jrRaid Posted August 21, 2008 Posted August 21, 2008 (edited) Hi, in a report we have the result of avg in percentages, showing as decimals, one digit. e.g : 95,5 One of the requirements for a specific report is that those numbers have to show as 'base' 10, with decimals: e.g. 9,5 but.... if the result is 100, it has to show up without decimals. e.g. 10. I tried the format number 'Do not display number if zero', but that doesn't do the trick. I probably need a sort of 'advanced' calculation... TIA Edited August 21, 2008 by Guest typo
comment Posted August 21, 2008 Posted August 21, 2008 Try something like: Let ( [ r = 100 * Round ( n ; 3 ) ] ; Int ( r ) & Case ( r < 100 ; "," & 10 * Mod ( r ; 1 ) ) ) where n is your average (between 0 and 1, inclusive). The result must be Text. I don't think this is a good method, though: the number of decimal places should be fixed, regardless of the actual value, to indicate the precision. And what does base 10 has to do with this? Of course it's base 10, and it will continue to be base 10 with any number of decimal places.
jrRaid Posted August 21, 2008 Author Posted August 21, 2008 Thank you Comment. As for your base 10 question, I know that, so here's a part of the requirements: 14. Las calificaciones de las materias se anotaran, segun sea el caso, con numeros enteros, [color:green]basos 10 y un decimal (5.2, 7.5, 9.3 )a excepción del "10" el cual no llevara ningun decimal. That's why I put 'my' base 10 between ''....
comment Posted August 21, 2008 Posted August 21, 2008 Typical bureaucracy: let's write something that looks like a specification, and put down as many details as we can think of, no matter how irrelevant. That will surely make us look smart. Is there any danger of someone writing the result as a binary number? Anyway, it seems that the maximum here is 10, not 100. I trust you know how to make the necessary adjustments.
jrRaid Posted August 21, 2008 Author Posted August 21, 2008 Yes, Comment, I already figured it out how to make the adjustments, thanks. This is nr 14 out of 17 pages requirements. The funny thing is that every 3 years there is another 'boss'. So the next one probably wants to put his/her signature under a 'base 100' again.....
jrRaid Posted August 21, 2008 Author Posted August 21, 2008 yes, department of..., and I have an other one waiting from an other government department, where the logic seems to be 'departed' as well....
Recommended Posts
This topic is 5998 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now