Percent value

In database I have a double value, example 0.976532111
I then multiplice it with 100 (to get percentvalue) I then reduce the number of decimals.
So it then show 97.7 the problem is if the double value is 1. The percent value is then 100.0 And that is not good, It look unproffesional. How do you do, is there a percentformat method?
Andreas

Yes that is one way. But my thought was that java had
a method to convert double, int, to percent a percent
value. Is there any such method?There should be a way, but if you want to do it mathematically then you can:double p1 = 20.0;
if(p1 % 1 > 0) {  //if mantissa exists
  System.out.println("%" + p1);  //print it with the decimal place
} else {
  System.out.println("%" + (int)p1);  //truncate the decimal place
}

Similar Messages

  • Export Cross tab percent values to excel as percent format

    Post Author: mailtovenkats
    CA Forum: Exporting
    Hi,
       when im exporting percent values in cross tab report to excel then excel format cell is not converting as percent and its format as genreral. i want to be excel format as percent.
    Any one help me do to achive this.
    Thanks,
    Venki

    Dear Yuka,
    You may check this thread:
    Re: Incorrect date format in excel reports
    Thanks,
    Gordon

  • CRforEnterprise - Axis with percent value

    Hi all,
    is it possible to format the y-axis with percent values in CR 4.0 or 4.1?
    I have a 100% stack bar chart, the axis-values are 0.1, 0.2, ..., 1.0. Other chart types (simple stackbar) do not offer this too.
    If I format the axis I can only choose date/time, currency or number format. In Crystal Reports 2013 I have a "percent category".
    Any ideas (without creating formulas * 100)? Thanks in advance!
    Best regards,
    Peter

    I have a similar problem - except it is with a formula that does multiply by 100.
    I have two numbers that are Running Total Fields.  I have a percent formula (includes *100) between the two, but I can't even get the pct fields to show up to be selected.

  • How can I convert (or switch) the RGB percent values from the LR histogram into RGB values which are shown e. g. in PS/CameraRAW?

    In LR 5.5 (same in previous versions) the RGB values in the histogram are shown in percent (relativ) values. I prefere to see the absolute values, but I can`t find any way to switch. Maybe this option is intentional disabled, because LR works in 16-Bit mode this would result in values up to 2^16. But as i compared the relativ values from LR with the absolute values from PS i run into a conversion problem. The following example shows the differences:
    CameraRAW : RGB, 128,0,0
    Lightroom: RGB, 43,8%, 19,0%, 6,2%
    CameraRAW: RGB, 0,128,0
    Lightroom: RGB, 29,8%, 47,5%, 17,5%
    Mainly i have two questions:
    1. Is there any possibility to change the percent RGB values in LR to absolut values?
    2. How can i convert CameraRAW values to LR values (see above)?

    TThe reason that a design decision was made from the beginning of LR to show only the percentage values was that RGB values are dependent on the color space and the LR histogram and numerical readout are derived from the Develop module's display space which is a hybrid color space with ProPhoto RGB primaries and the sRGB TRC. Thus the numerical values in the display would be different from the exported RGB image (in an orthodox space) and it was feared that this would be misleading. When soft proofing was introduced, because it involved converting the display to an orthodox space, it became possible to use the 0-255 scale in that mode.

  • Cfchart - how do I stop percent value from rounding

    I am trying to present a simple chart with
    labelformat="percent" (see below).
    The problem is that the values being presented are decimal
    values between 1 and 2. Although it appears to put the data markers
    in the correct placed, it is rounding the label to the nearest
    integer. so 1.86% becomes 2%, 1.44% becomes 1% etc.
    Does anyone have any suggestions on how I can stop this
    rounding?
    Thanks in advance.
    ==============================
    <cfchart style="blue" show3D="no" chartwidth="800"
    chartheight="500" showlegend="yes" format="png"
    labelformat="percent" >
    <cfchartseries type="line" seriesColor="green"
    seriesLabel="Victoria">
    <cfchartdata item="July 2007" value=".0186">
    <cfchartdata item="August 2007" value=".0170">
    <cfchartdata item="September 2007" value=".0160">
    <cfchartdata item="October 2007" value=".0144">
    </cfchartseries>
    </cfchart>

    select the cells with the dollar amounts, then open the cell formatter and select "Currency"
    Now set the number of decimal places.  Note... Numbers will round to the number of digits you select so you should know that what you see in the cell may be different that what you typed into the cell.
    If you set the number of digits in the cell formatter to 3, then type in a value "1.2368", Numbers will display "1.237"

  • Turning double into percent values..

    let's say i have a double value like this
    0.05989773557341125
    i want to turn it into a percentage
    i tried:
    int percent = (int) number*100;
    but it doesn't work and a zero comes out of it

    int percent = (int) number*100;That casts number to an int (which rounds it down to 0) then multiplies it by 100.
    int percent = (int) (number*100.0);That does the multiplication on floating point types, then casts the result to an int, truncating the decimal part.

  • Database design: field to store percent value

    I need to create a table T that holds field P which is going to store percentage values.
    1. Should database store in field P value "3.5" or "0.035" if user enters on web page string "3,5%"? Which is wiser design- to store as values in range 0..1, or in range 0...100 for percentages?
    2. How does enterprise products solve this? For example, "Oracle E-Business Suite" is there any field that holds percentage value? How it holds?
    Thanks.

    1. Should database store in field P value "3.5" or "0.035" if user enters on web page string "3,5%"?
    Which is wiser design- to store as values in range 0..1, or in range 0...100 for percentages?I prefer storing percentages as numbers in the range 0...1.
    To constrain the values on the db filed you can create a check constraint:
    SQL> create table test (pct number(4,3));
    Table created.
    SQL> alter table test add constraint pct_chk
      2  check (pct between 0 and 1);
    Table altered.
    SQL> insert into test values (1.001);
    insert into test values (1.001)
    ERROR at line 1:
    ORA-02290: check constraint (USER.PCT_CHK) violated
    SQL> insert into test values (1);
    1 row created.
    SQL> insert into test values (0.001);
    1 row created.
    SQL> insert into test values (0);
    1 row created.
    SQL> insert into test values (-0.001);
    insert into test values (-0.001)
    ERROR at line 1:
    ORA-02290: check constraint (USER.PCT_CHK) violated
    2. How does enterprise products solve this? for example, Oracle Erp is there any field that holds percentage value?I don't know.
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/17/supporto-di-xml-schema-in-oracle-xmldb/]

  • How could I set a spot color to particular percent value?

    Hi,
    In one of my samples PDFs I have this content part:
    /OC /MC0 BDC
    /CS0 cs 0.6 scn
    /GS0 gs
    0 0 283.46 283.46 re
    f
    EMC
    How could I achieve the same value of '0.6' for some ColorSpace component with Acrobat SDK 9.x?
    If I do usual Graphics state creation and then apply it to my object - I could only get this result:
    /OC /MC0 BDC
    /CS0 cs 0 scn
    /GS0 gs
    0 0 283.46 283.46 re
    f
    EMC
    How could I get those 60%, i.e 0.6? I don't see that in obvoius way in PDEColorSpec structure.

    Ok, I have an answer to my question. In short - you need to use PDEGraphicState filling logic as for DeviceCMYK, but with some caviats.
    Hope one day Adobe will put that into his own Acrobat SDK docs/samples. Till then I'll charge 1/2 of their Developer Support case if anyone will need an answer from me.

  • Adjusting tones of a CMYK color by percent value?

    Is there a way to take a CMYK swatch and back it off percentage-wise, like you would a Pantone color, without going in and adjusting the color values by "eyeballing" only?
    I know Transparancy will let me lighten the image percentage-wise, but then I get showthrough to whatever's behind.
    Is there a way to "add white" so-to-speak?

    Redefine the Swatch as Global.
    Apply (or re-apply) it to a path.
    Now when you select the path, the Color palette will show one slider, which you can adjust to create tints.
    Then, to alter the relative mix of the base color, edit the Swatch, not the object.
    All Swatches in AI should be created as Global.
    JET

  • Default Wage Type Values in Infotype 8 screen using  exit EXIT_SAPFP50M_002

    Hi Experts,
    I am facing an issue with defaluting few of the Wage Type Amount/Percent values in Infotype 8 when PAI gets triggered while chnaging the record.
    I have implemented the custom logic and updating Wage Type amount for IT0008 sturcture in PAI ( PBAS0001 -> EXIT_SAPFP50M_002) and again rewriting the data back to screen by using cl_hr_pnnnn_type_cast=>pnnnn_to_prelp. But the changed data is not getting shown on the screen. Can some one help me out on this issue.
    I have tried with SHOW_DATA_AGAIN = 'X', but this is leading to non functioning of SAVE button. No BADI will suit for this requirement. How to acheive the solution for this issue?.
    This is an high priority issue for us and would appreciate your help in resolving this issue.
    Thanks and regards,
    Srikanth Reddy.

    Hi Srikanth
    Try updating IT0008 by submitting a report, as mentioned below:
    IF
    UR CONDITION
    SUBMIT ZHR0008 (for example)
    ENDIF.
    In ZHR0008
    CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
    Hope this helps
    Best Regards
    Reddy

  • Asset Value less than 5%

    Dear All,
    we want the list of all assets whose value is less than or equal to 5% in the respective fiscal year,so that we can scrap those assets.
    Is there any SAP Stand report/program available for our requirement,if so suggest.
    If not,suggest any other work around like Query,Report Painter,etc  with details steps("Z" report,my client is not interested).
    Do revert
    Regards,

    .Hi,
    Easier way is to execute the report S_ALR_87011963, download the data into excel and filter less than 5 or 10 percent value assets thru a formula.
    Another option available is to use an additional field for computing NBV and call that field in the query.
    Net Book Value = KANSW + KNAFA + NAFAG
    Best Regards,
    Madhu
    Edited by: Madhusoodanan Ramachandran on Apr 30, 2010 3:31 PM

  • Formating in a CrossTab - dollars vs percent

    I have a cross-tab in which I have added two additional calculated columns to show the difference between the two previous columns. 
    One column shows the difference in dollars (since the previous columns are in dollars).
    The second column shows the difference as a percent. My calculation works great for the Percent column, however the column is formatted as currency. This makes sense of course, since the data used for the calculation are also in dollars.
    However, if I change the format of the percent column to be a percent, all of the other columns in my cross-tab also change to a percent. It seems that it is either an all or nothing situation.
    I notice that when I select a field in the u201C% Changedu201D column, all of the values in the Cross-tab are selected. Is there a way to select only the column that I want to work with?
    Can anyone point me in the right direction?
    Thanks in advance.

    Problem:  Cross Tab formatting different columns with dollars and percents within the same row
    We would like to set certain columns to dollar values and certain columns to percent values in Cross tabs but you click on one row and it changes that value format for the whole row. We can only change either all dollars or all percents. What we would like is to be able to specify which columns are dollars and which ones are percents.
    Solution:  Create a formula in the Format Field to pick a $ or % based on the current column.
    1)  Right click on any data value and choose Format Field
    2)  Click on the Number tab and click on the Customizeu2026 button
    3)  Click on Currency Symbol tab, check Enable Currency Symbol,  choose Floating
    4) Click the x-2 button for Position
    Type in titles of the columns you want to have dollars values and let the rest go to percent
    select GridRowColumnValue(<db field>)
    case "<column title>", "<column title>", "<column title>" : crLeadingCurrencyOutsideNegative
    default: crTrailingCurrencyOutsideNegative
    (for example)
    select GridRowColumnValue("merchant_transaction_detail_rpt.trans_date")
    case "Current", "Previous", "Yr Ago" : crLeadingCurrencyOutsideNegative
    default: crTrailingCurrencyOutsideNegative
    5) Click the x-2 button for Currency Symbol
    Type in titles of the columns you want to have dollars values and let the rest go to percent
    select GridRowColumnValue(<db field>)
    case "<column title>", "<column title>", "<column title>" : "$"
    default: "%"
    (for example)
    select GridRowColumnValue("merchant_transaction_detail_rpt.trans_date")
    case "Current", "Previous", "Yr Ago" : "$"
    default: "%"
    Hope this helps. This is copied and pasted from a word doc I created with screen shots that I can email to you if you think it will help.

  • Wrong Percent Data In the table

    Our customers require us to demonstrate one report involving Year, Quarter,Month, Sales,SalesPercent through the table style.So we encount the issue that we do not know how to show the data in the table. We have one method to solve it,but there it a little problem as below detail information.
    In the SalesPercent formula,we write the code "sales/sum(sales by Year,Quarter)" manually and order by YEAR,Quarter. but the YearTotalPercent is incorrect.
    For example
    Year Quarter Month Sales Percent
    2009 2009/Q1 2009/1 300 30%
    2009 2009/Q1 2009/2 300 30%
    2009 2009/Q1 2009/3 400 40%
    --------Total-------------1000 100%
    2009 2009/Q2 2009/4 200 20%
    2009 2009/Q2 2009/5 200 20%
    2009 2009/Q2 2009/6 600 60%
    --------Total-------------1000 100%
    Total---------------------2000 wrong data(excepted data is 100%)
    I do not know why it generate the wrong the data.If you know the method for solving the issue or how to implement the requirement in table view,please tell me. Thanks

    Yeah,Before I try to use the pivot table,but to some case, it does not display all percent values that some percent columns are empty.So I use the handcode formula in the table view to solve the requirement.
    For example:
    Year Quarter Month Sales Percent
    2009 2009/Q1 2009/1 300 30%
    2009 2009/Q1 2009/2 300 30%
    2009 2009/Q1 2009/3 400 40%
    --------Total-------------1000 100%
    2009 2009/Q2 2009/4 200 (NULL)
    2009 2009/Q2 2009/5 200 (NULL)
    2009 2009/Q2 2009/6 600 (NULL)
    --------Total-------------1000 (NULL)
    Total---------------------2000 100%

  • Value references

    Hello,
    although I've looked through the numbers handbook, I can't seem to find a solution to my syntax error:
    I'd like to give my illustration students project grades from 1 to 6 (German system) based on their percentages. I'd tried using the numbers grading table as a reference; however, when I build my own table, it doesn't work.
    Here is what I've done:
    *Table 1*
    I've a column for Name, four project value columns (percent), a sum of 100% (the sum of the four project values) and one final column for the school grade.
    *Table 2*
    This is a two column table
    Column A is percent values
    Column B is the German school grade
    The original numbers document has a complicated reference based on bell-curving the grades. I don't need this.
    The original numbers document uses the following reference to carrying in the grades:
    =WENN('100%' Holger Meier<0,6;Notenskala :: $C$13;SVERWEIS('100%' Holger Meier;Notenskala :: $B$2:$C$13;2))
    I've tried copying & pasting the formula, changing the B-Values to A-Values and the C-Values to B values. I get a syntax error. The second error I get is that I cannot reference '100%'.
    What would be the correct formula for referencing the grades? Have I overlooked a step?
    Thankyou
    -Kim

    Am I correct, or is
    there some Doc findElement(String ref, Doc context)
    method lurking...?Idiot! Of course there is: ClassDoc.findClass(ref) will do!
    ( Sorry! :$ )

  • Help Creating Dynamic Stacked Column Chart with Multiple Criteria

    Hi all. Im new here and hoping you can help.  I have a dashboard Im trying to rebuild from scratch (our computer had a meltdown and we lost all our files). I did not build the dashboard initially so Im trying to recreate it from the flash file we were able to recover. I have come across a chart that I just cannot figure out how to do.  I can figure out how to write an array in the Excel sheet that pulls the data into a table the way I need it to be but found out after I wrote that that Xcelcius doesn't support arrays so all my data disappears when I go into preview mode (which is especially frustrating since I can see the chart working fine in design mode).  Anyway this is what the data table looks like
    Month         Year            Company      Positive #          Negative #         Neutral #          Positive %       Negative %      Neutral %
    October      2011            CompanyA      1234                1234                 1234                 10                    10                    10
    October      2011            CompanyB      1234                1234                 1234                 10                    10                    10
    October      2011            CompanyC      1234                1234                 1234                 10                    10                    10
    October      2011            CompanyD      1234                1234                 1234                 10                    10                    10
    November  2011            CompanyA      1234                1234                 1234                 10                    10                    10
    November  2011            CompanyB      1234                1234                 1234                 10                    10                    10
    November  2011            CompanyC      1234                1234                 1234                 10                    10                    10
    November  2011            CompanyD      1234                1234                 1234                 10                    10                    10
    December  2011            CompanyA      1234                1234                 1234                 10                    10                    10
    December  2011            CompanyB      1234                1234                 1234                 10                    10                    10
    December  2011            CompanyC      1234                1234                 1234                 10                    10                    10
    December  2011            CompanyD      1234                1234                 1234                 10                    10                    10
    The original chart was built so that you would choose the month from a combo box and then the company names would show up along the X axis with their % amounts shown in the stacked column.  I know how to make a combo box work and I know how to make a stacked column chart work with static data.  I cannot for the life of me figure out how to get it to work so that when you choose the month from the combo box it filters the data.  I've tried filtered rows but I'm just missing some information that makes it work and I can't figure out what that information is.  It has to be able to get the month/year combo from the combo box and then go to the table, filter it by month and year and then create a multi-row table of data with just the company and the percent values.  Any help would be greatly appreciated!

    Which connection you are using?
    IF quite difficult if you are working under static data.

Maybe you are looking for

  • REPORT FOR SOURCE LIST OF MATERIAL WITH VENDOR DESCRIPTION

    Dear All Let me know is any transaction where i will get the material source list similar as me03 transaction but with vendor name also . Regards, Rajendra Sawant.

  • HP Envy 5660 - Paper jam message

    Our HP Envy 5660 printer is 2 weeks old.  It was purchased at an electronics chain store.  Set-up was easy.  No issues until the second week of ownership.  An error message popped up reporting a paper jam issue.  Followed directions to take out the j

  • No deserializer is registered for schema type: DTORecord

    Created an empty project and selected Web Service Proxy from the New... gallery and gave it the URL of my .NET Web Service; accepted all defaults. Proxy was built, I added some code to display results and it compiled w/o errors. Error happens when de

  • Capital letters in artist name. Difference between ipod classic and iPhone

    My ipod classic knows that "Peter Gabriel" and "peter gabriel" is the same artist. But the iphone distinguishes between the 2. This is a really annoying "feature". How come it's different? My wishlist for a iOs 4,1,1 update would be for this feature

  • Delete rows from a database

    Hi, I am a beginner in JSP and I have a problem, I hope my English will be good enough to explain it! I have a web application that displays records in a table from a postgres database. Each row must have a Delete button, so the user can delete the r