Formula rounding (?)

Post Author: hollyschulz
CA Forum: Formula
I'm not even sure if this is the problem, but I can only assume it is....
Here's my formulas:Main (the one whose result I can't get right):   truncate({@key_pct_avg}\{@distinctcount}, 4) - note, i just added the truncate to try working out the rounding, it didn't help.@key_pct_avg = (Sum ({Sheet1_.KEYED ERRORS}, {Sheet1_.name}) / (Sum ({Sheet1_.KEYED Records}, {Sheet1_.name})))*100@distinctcount = distinctcount({@month})@month= if month({Sheet1_.DATE})=8 then "August" elseif month({Sheet1_.DATE})=9 then "September" elseif month({Sheet1_.DATE})=10 then "October" elseif month({Sheet1_.DATE})=11 then "November" elseif month({Sheet1_.DATE})=12 then "December"
Since my record selection only includes August - lastfullmonth, the @distinctcount come to "2".The value for ONE @key_pct_avg is 2.89.When you work out the formula it would be 2.89\2 = 1.445 The results I get from Crystal is 1.00. Now, there are other values for the formula throughout the report... But Crystal always gives a rounded number with no decimal values! Help!

Post Author: SKodidine
CA Forum: Formula
Easy enough.
In CR, the \ is different from / when it comes to calculations.
\ = integer divide. Divide the numbers and truncate the quotient to an integer.
/ = do the division and display the entire quotient including decimals.
In your formula truncate({@key_pct_avg}\{@distinctcount}, 4)  you are asking it to give the quotient as an integer value with no decimals.
2.89\2 = 1.445 and truncating the quotient to an integer the result is 1.  Change the division operator to / and it should solve your problem.
2.89/2 = 1.445
change the formula to: {@key_pct_avg}/{@distinctcount}

Similar Messages

  • Formula rounding to nearest whole number

    Hello,
    I have created the following formula ( Metrics."# of Leads Resulting in Won Opportunity"*100 /Metrics."# of Leads" ) and displayed the results in percentage but it looks to round to the nearest whole number does anyone know why this might happen. Also i am using 2dp in the results i am hoping to get the actual result rounded to 2dp and not the nearest whole number.

    Hi !
    I think that if you add the ROUND function, this will work... :
    ROUND(Metrics."# of Leads Resulting in Won Opportunity"*100 /Metrics."# of Leads", 2)
    Hope this will help, feel free to ask more !
    Max

  • Increasing percentage formula, rounding up in Numbers '09

    Having a hard time with numbers formulas... I need to increase a sum by 9%, rounding up. I have this formula: =roundup(81.09,0) but I know I am missing something.
    Anyone? Bueller? Thanks so much!!
    **blip**

    ROUNDUP(81.09,0) will round 81.09 to the nearest higher whole number = 82.
    To increase a number by 9%, you multiply by (1+9%) or 1.09.
    81*1.09=88.29
    If you want to round it up to a whole number then it would be ROUNDUP(81*1.09,0) = 89

  • Bex Formula Rounding Up Values!

    Hi Guys,
    I am doing a calculation in BEx where I divide items by days (items%Adays) but the result value is 4.77 on a calculator but Bex rounds up to 4.0!  All my results differ by the fraction so I need to the 4.77 to come up else all columns will be 4.0!
    In properties I increased the decimal places to 2 d.p for the results formula field but it didnt work!
    Anyone have any ideas?
    Thanks
    DV

    Depesh,
    This is the same as posted by AVR but contains the procedure also...
    Check the following ,
    have you defined the decimal places in the KF properties . Right click on KF and select properties , the decimal places will be a dropdown.
    Set the same to the first value in the dropdown and then execute your query , come back with the results.
    Arun
    Assign points is helpful...
    Message was edited by: Arun Varadarajan

  • Work center formula - rounding to zero?

    Hi
    I have set up a new formula for a work center, using a new parameter Z_BKP5 (Parameter1.jpg). It should be fixed to 2000.
    My formula is: Operation qty/Z_BKP5* Variable machine time.
    However, if my operation qty is bigger than Z_BKP5 (2000), then I get the result (Test1.jpg), for example 2000/2000*180 MIN => result is 180 MIN
    If my operation quantity is smaller, I don't get anything calculated (Test2.jpg). The same happens on Test formula screens as well on planned orders.
    Example 1900/2000*180 MIN
    Is it some rounding issue? I have tried finding a parameter in customizing for this, but I cannot find anything related. Can this be solved somehow, or is this standard behaviour?
    Thank you

    Just for future help, I'd expect that means your data container is integer.  In that case, it's important to do your multiplications first and your divisions last.
    An alternate problem that you can also run into is that you can exceed the max size of the container and get an overflow.  Then you need to look at the expected size of the max and min values of each variable and try to work them in  alternately so as neither to go below 1 nor above max value.
    Neal

  • Round Up on Thousandths decimal using FormCalc

    Currently I have a numeric object called perHour and one called, payPeriod.  I am using a FormCalc formula to round up to the 2nd decimal point (hundreth) based on the value in the 3rd decimal spot (thousandth).  Using this formula:  $ = Round(perHour, 2)  *  (what ever I want).  I have been asked to create a value that rounds the 2nd decimal spot (hundreths) up to the next digit value if the 3rd decimal spot (thousandths) is 1 or higher.
    Example:  2.342345    using current code -----> 2.34 * (what ever I want)
                   2.342345    New code (unknown) -----> 2.35 * (what ever I want)
    Can anyone provide an answer???? Does this code involve the ceiling / floor concept. ----Allen

    Javascript is so much cuter and I am not good with formcalc
    Try this one. It will round till 999 (f.ex 333 -> 300) normally and after 1000 upwards to the next thousand (1001 -> 2000)
    You can also add Text like in the lower case if you take a Textfield.
    var a = NumerischesFeld1.rawValue;
    var b = a;
    if (a < 1000)
    a = Math.round(a/100);
    a = a*100;
    this.rawValue = a;
    if (a >= 1000)
    b = Math.floor(b/1000);
    b = b * 1000;
    if (b < a)
    b = b + 1000;
    this.rawValue = b + " what ever you want";
    Hope I got you right.
    Lisa

  • Creating user exits for Formula Routine in Tcode O5F5

    Hi All,
    I have to create a new rounding routine for my projet in transaction O5F5. The path which i have taken is. In transaction O5F5.
    Maintain Formula & Average Pricing Exit -> Formula Evaluation -> Formula rounding. Now after creation a new formula e.g 901. I have at first got a report created with name ROICO901 (an executable program). which got included in Include file ROICONNN. Upon tring to activate the program it gave an error because of the Report ROICO901 statement, which letter was handled as that program was included and has to be treated as an include file.
    My question is that after creating the program in this newly created file what are the steps i need to be done to activate it, as because when the TR was imported to quality the file where ROICO901 was included did not get changed.
    Thanks
    Anjanav Das

    Anjana V Das,
    1.Register the Object ( Custom Routine ) in SAP Service Market Place and get the SSCR Key.
    2.Do the required changes in the Custom rouine ie ROICO901
    3.Activate ROICO901 using SE38
    4.Run RV80HGEN program to activate the Custom routine.
    5.Check if the custom routine is available in ROICONNN and also the ACTIVE checkbox is ticked in O5F5. ( only to confirm that the first 4 steps were done correctly )
    You need to run RV80HGEN again in Q and P once the Custom Routine is transported successfully.
    or
    You can tag the RV80HGEN program as XPRA along with the Custom Routine in the TR and get it imported to Q and P after testing.XPRA will set RV80HGEN to automatic execution to activate the custom routine once the TR is imported in the target server.This is the advisable approach rather than running RV80HGEN separately after importing the TR in Q and P as a cut over activity.
    ROICO901 and  ROICONNN prog names differ based on the application area.
    K.Kiran.

  • Rounding Error

    I have 501.30 typed into a cell (E74). In the next cell (F74) I have the formula: =ROUND(E74*.15, 2)
    Why am I getting 75.19 instead of 75.20? If you use a calcutator or show the above formula without the ROUND function you get 75.195. It's not rounding this number up.

    This comes up from time to time. It has to do with how decimal numbers are represented in binary digital computers. There is an IEEE standard that Apple follows strictly in Numbers, versus doing some "massaging" of the results to better meet customer expectations.  I believe it is the strict adherence to the standard that is the problem you see. Decimal numbers often cannot be represented exactly in binary and it results in small errors.  As a test, do the following
    B2 = .1
    B3= -.3
    B4= .2
    B5 = SUM(B2:B4)
    The result will not be zero
    The answer may also change depending on the order of operations
    501.3*0.15 -75 - 0.195 is equal to -6.8E-15
    501.3*0.15 - 0.195 - 75 is equal to 0
    Whether Apple is right or wrong in sticking strictly to the standard is debatable. There are cases in Excel where the "massaging" creates a false zero when the true result is supposed to be a very small number. My personal preference is for the numbers to be massaged to meet my expectations but that's not how it is in Numbers.

  • Turn off rounding up in currency calculations

    This may have been asked so excuse if it has.
    I have a new spreadsheet of pricing information I use for ordering products that calculates unit pricing from a larger package. What is happening is that when the calculation is done, even though I say precision of 2 dec. points, the greater precision remains. So when I multiply the unit price by say two - it takes and rounds up to the next penny. HELP I HAVE BEEN FORCED TO USE MY WINDOWS MACHINE AND I DONT WANT TOO!
    Thanks for any help at all.

    Hi Hiker,
    Welcome to Apple Discussions and the AppleWorks forum.
    The precision setting in the Number format dialogue determines the precision with which the result of a calculation is displayed, but has no effect on the actual result.
    To change the result, use the ROUND(number,number of digits) function.
    Substitute your current formula for "number" and 2 for "number of digits"
    Example: current formula =A3/B3 +(where A3=lot price, B3=items in lot)+
                        new formula =ROUND(A3/B3,2)
    Regards,
    Barry

  • Can conditional formatting detect formulas?

    I have a spreadsheet for home accounts/debts etc, and I like to put forward calculations in columns so I can get an idea of how long it will take to pay off debts. These forward calculations are formulas based on APRs etc, and I manually format them in grey italics. When a bill comes in with the actual amount on it, that formula gets replaced with the bill amount, and I switch the format to black plain text so I can see it's an actual value.
    Is there any way, using conditional formatting or otherwise, I can automate this so that when I type in a real value it can detect it's not a formula and reformat the cell?
    Thanks!

    No.
    Conditional format rules depend on comparing the value contained in the cell, and pay no attention to how that value got there.
    That said, it might be possible to examine the value and determine whether it was entered directly or formula generated. If the value in the cell is NOT equal to the value in the cell rounded to two decimal places, then chances are the value was generated by a formula. Not perfect, as it will not detect generated values that are exact to zero, one or two decimal places (eg. 12.00000, 12.10000, 12,12000, etc), and won't find any values where the formula itself actually rounds (as opposed to 'displays') its result to two (or fewer) decimal places.
    Here's an example:
    As indicated in column A. the values in B2 and B3 are entered numbers, those in B4 and B5 are calculated. Column B is formatted to DISPLAY these numbers as Currency, with the usual two decimal places.
    Column C uses the formula =B to transfer the  actual values in column B. Formatting is set to automatic.
    Column D uses the formula =ROUND(B,2) which rounds the values in column B to two decimal places. Formatting is set to automatic, so what is shown is the actual value.
    The conditional formatting rule, shown for cell B5,  compares the actual value in column B with its rounded counterpart in column D. If they are the same, the assumption (wrong, in this case) is that the value was entered, and the rule applies bold style to the text and a light grey fill to the cell. If they are different, no change is made.
    Note that there's some tedium involved in setting this up, as the rule for each cell uses a different comparison cell, and these must be set (or reset) individually.
    Regards,
    Barry

  • SUM function in a calculation

    Hi All,
    Hope all is well. I'm at an early beginner level with Discoverer/Oracle
    a) Have a calc to determine how many weeks it took from when the course ended that the instructor handed in the grade.
    Calc_DateDiff
    ROUND(( TRUNC(Final Grade Date)-TRUNC(Meeting Time.End Date) )/7)
    b) If (a) is less than 7 weeks, then it is ON TIME otherwise it is LATE
    so i created these 2 calcs:
    1) calc_ontime CASE WHEN Calc_DateDiff < 7 THEN 1 ELSE 0 END
    2) calc_late CASE WHEN Calc_DateDiff < 7 THEN 0 ELSE 1 END
    c) would like to summarize by Course id, total handed in on time, total handed in late
    but the following calc creates a column with nothing in it:
    SUM(*calc_ontime*) OVER(PARTITION BY Student Course.Course ID )
    so i tried replacing the calc with the code behind the scenes of calc_ontime, and also, the calc column is empty:
    SUM(CASE WHEN Calc_DateDiff < 7 THEN 1 ELSE 0 END) OVER(PARTITION BY Student Course.Course ID )
    so i tried replacing calc_datediff, with it's formula and am getting a syntax error that i cannot solve:
    SUM(CASE WHEN ROUND(( TRUNC(Final Grade Date)-TRUNC(Meeting Time.End Date) )/7) < 7 THEN 1 ELSE 0 END) OVER(PARTITION BY Student Course.Course ID )
    and it's not liking the End Date field, even though i pasted it from the folder.....
    ====
    Do you have any ideas how i can SUM the calc_ontime and calc_diff field, bec once i have the sums
    i need to divide into the total class pop to come up with a percentage of how many students handed in on time
    and how many students handed in late.
    or should i create a function for dba to register into Discoverer that would do this, where i would feed in the course id
    as a parameter?
    SELECT SUM(CASE WHEN ROUND(( TRUNC(Final Grade Date)-TRUNC(Meeting Time.End Date) )/7) < 7 THEN 1 ELSE 0 END)
    FROM student course
    ,MEETING TIME
    WHERE student course = parm_course
    GROUP BY OVER(PARTITION BY Student Course.Course ID )
    pls advise, tx for your help, sandra

    Hi Michael,
    a) i understand what you wrote about DATE in a field with an embedded space could be misunderstood by Discoverer
    as the keyword date.
    b)putting quotes around meeting time.end date - did not work for me....
    ( in the past, i have seen quotes around a field, when i typed a field name incorrectly, so when i see a field in quotes in a calc - i would generally guess that it is an undefined field..... that needs to be fixed for calc to work)
    c) can i back pedal:
    this is one of orig formulas:
    ROUND(( TRUNC(Final Grade Date)-TRUNC(Meeting Time.End Date) )/7)
    i create more calcs:
    calc_FinalGradeDate:
    TRUNC(Final Grade Date)
    calc_EndDate
    TRUNC(Meeting Time.End Date)
    then i went back to calc_DateDiff and wrote this:
    ROUND( Calc_FinalGradeDate - Calc_EndDate/7)
    i got a data type error......
    do you think that any field with an embedded space that has DATE in it would cause problems, and that i would
    have to go to Discoverer Admin to put in hyphens?
    any ideas for above would be greatly appreciated, tx, sandra

  • Sub: Tax Combinatiom. Tax rate, tax Amount in the print lay out design of t

    Dear all,
    Sub: Tax Combinatiom. Tax rate, tax Amount in the print lay out design of the A/R Invoice
    I have to Create a Print Lay out design of the A/R invoice for the Indain standrad please provide me some solutions for the following problems to locate the Tax combinations,Tax rate  and the Tax amount in the PLD  A/R Invoice ,
    PACAKGE  SAP B1 2005B
    Need a standrad solution as per the requriment
    Eg: Row Level
    Tax Code created is BED+VAT
    Tax combination details is
    Name of Tax type   Rate
    Excise                     16%
    Ecess                    2%
    Hcess                    1%
    VAT                       4%  
    Row No     Item  Qty   UnitPrice  Tax code  Total(LC)    Tax Amount
      1             X      10     10000      BED+VAT   100000      21139
                                             (Excise =16000,Ecess=320, Hcess=160, VAT=4659)
    2              Y      5      20000      BED+VAT    200000       42278
                                            (Excise =32000,Ecess=640,  Hcess=320, VAT=9318)
    In Print  Lay out Design Requried is the deatils of Tax code combination , Rate and the Tax Amount in the followig way 
    Excise    16%   =48000
    Ecess     2%    =960
    Hcess     1%    =480
    VAT       4%    =13977
    Please send the feedback as early as possible urgently requried
    for the further details send the feedback
    Reagrds
    Mr.Chitrasen

    Hi experts,
           Pls anybody have an answer to my question, i'll be very thankfull to u,
                     I wanted to display the Tax Break ups in Invoice say,
    ECess            25
    Vat                 56
    Excise duty    32
    I've tried a lot with many of the SAP Forum thread but the results is not satisfactory..am using SAP Business One 2007 b
    pls anybody who can guide me with step by step PLD creation for this problem.
    I done the below steps in PLD
    In Repetitive area 1
    Field_1:  Table-> OSTA                    
                  Column-> Type                               
    Field_2 : Table-> OSTA                  
                  Column -> Code                               
    Field_3:  Table-> OSTA                   
                  Column-> Rate
    Field_4:  Table-> OSTA                  
                  Column-> Name  
    Field_5:  Table-> A/R Invoice Tax amount per document
                    Column-> Tax amount
    Field_6 : Table-> A/R Invoice Tax amount per document
                    Column-> Base amount
    Field_7 :  Formula ->  Field_6 * Field_8
    Field_8 :   Formula->  Field_1==1
          NOW I SORTED REPETITVE AREA 1 WITH 'SALES TAX AUTHORITIES;cODE' AND TICKED THE CHECK BOX 'SUMMARY'
        AND MADE THIS REPETITIVE AREA INVISIBLE.
    IN Repetive area footer
    F_01 :    Formula->   Field_4       
    F_02 :    Formula->   Concat(Round(F_rate,0), '%')
    F_03 :    Formula->   Round(ColSum("F_tax_amount"),2)
      I grouped the Repetitive area footer as Group 1
                                here i get the result but the Tax Rows are repeating and Tax amount varies for VAT for each rows
    pls help me guys...          
                   Thanks in advance,
                   Dinesh
    Edited by: Dinesh S on Dec 23, 2011 1:28 PM

  • Formatting a field in the repetitive area of the Print Layout Design

    Our quantity fields in the repetitive area print out with a decimal point and 3 spaces after the decimal point (i.e. 10.000). How can I change the format of these fields so that there are no decimals included (i.e. 10) when we print an order?
    Thanks.
    Edited by: Philip Eller on Jun 19, 2008 9:56 AM
    Edited by: Philip Eller on Jul 3, 2008 3:11 PM*

    Mike,
    You could use the Formula ABS( )
    Add a Formula type field
    In the Formula select formala ABS()
    syntax: ABS(Field_xyz)..here field Field_xyz is your number field
    If your value was 10.000 the result will be 10. This formula ignores the decimal part.
    The formula ROUND could be used if you want to ROUND the value to the nearest higher or lower integer
    Consider number 10.450
    ROUND(Field_xyz,2)  will give 10 
    ROUND(Field_xyz,1) will give 11
    Suda

  • Complicated Excel form needs to be converted to PDF Fillable form

    I have an Excel file have has hidden cheater fields (M&N) and a hidden lookup table (O:P).
    The form fields that are used follow (using row 10 as an example, rows 10-25 are involved)
    E10 = Lengthft (entry field)
    F10 = Widthft (entry field)
    G10 = Patchsy (formula)=ROUND(IF(F10="",0,(E10*F10)/9),3)
    H10 = PlanPatchThicknessin (entry field)
    I10 = MeasuredPavementThicknessin (entry field)
    J10 = Adjustedsy (formula)=IF(F10="",0,IF(N10="Extra Work","Extra Work",G10*(N10/100)+G10))
    M10 = hidden field (formula)=((I10-H10)/H10)*100
    N10 = hidden field (formula)=VLOOKUP(M10,O1:P7,2)
    Hidden Lookup (O1:P7):
    -99
    -20
    -30.0001
    -15
    -20.0001
    -10
    -10.0001
    10.0001
    10
    20.0001
    15
    30.0001
    Extra Work
    I know very little about java script and have been learning as I go.  I have created some custom calculation fields but this is way over my head.  I have converted the pdf to a form and added the fields, I have already added calculations for Patchsy and ToDatesy (not shown in list of fields).
    I am completely lost in how to proceed with the Adjustedsy field because it is using all these hidden fields to obtain the answer.
    I hope someone can help me.
    Thanks

    I have tried to write this out as a problem and not sure if it makes sense to anyone but me.  This is all used to fill one field (AdjustedSYRow1).  The last part of the problem is written as an if statement.  Not sure how else to write it out.
    I understand the variable part and can write the first part of the problem - then I get to the lookup and don't know how to do that.
    // Get field value
    var v1 = getField("MeasuredRow1").value;
    // Get field value
    var v2 = getField("PlanRow1").value;
    if (v1==0) event.value = "";
    else event.value = (v1 - v2)/v2*100;
    That will answer the first part of the problem, but then I get hung up on the rest of it.
    First part of the problem:
    ((Measured Pavement Thickness - Plan Patch Thickness) / Plan Patch Thickness ) * 100
    Example with form field names:  ((MeasuredRow1 – PlanRow1) / PlanRow1) * 100
    This is where I get stuck:
    If the answer to the above is…
    < -30 then -20,
    between -20.0001 and -30, then -15,
    between -10.0001 and -20  then -10,
    between -10 and 10, returns null(?), a period was used in the excel lookup because a zero would not work – but it means that there is no adjustment.
    between 10.0001 and 20  then 10,
    between 20.0001 and 30  then 15,
    over 30 then “Extra Work”)
    The above information (in bold) is then used to complete the rest of the problem. 
    =IF(F10="",0,IF(N10="Extra Work","Extra Work",G10*(N10/100)+G10))
    Example with form field names:  If WidthftRow1=””,0,if(above answer is “Extra Work”, “Extra Work”, PatchRow1*(above answer/100)+PatchRow1

  • How to calculate the row size

    Hi,
    I am having a table of 4 column. First column is varchar2(10), Second column is Number(5), Third column is char(10) and Fourth column is Number(12,2).
    Now how to calculate the size of each row. I want to know how much space it will take for each row.
    Thanx & Regards,
    Swarup

    For a complete discussion of storage requirements for different datatypes see the Oracle 8i Concepts manual.
    All Oracle documentation is available on-line via the 'Documentation' link on the OTN home page.
    Your Col2 NUMBER(5) will take 4 bytes if it holds a 5 digit positive or negative number.
    Your Col4 NUMBER(12,2) will take 7 bytes if it holds a number with 12 digits that is positive and will take 8 bytes if it holds a number with 12 digits that is negative.
    The following is from the Concepts manual Chapter 12 (Copyright by Oracle)
    Built-In Datatypes 12-9
    Internal Numeric Format
    Oracle stores numeric data in variable-length format. Each value is stored in
    scientific notation, with one byte used to store the exponent and up to 20 bytes to
    store the mantissa. The resulting value is limited to 38 digits of precision. Oracle
    does not store leading and trailing zeros. For example, the number 412 is stored in a
    format similar to 4.12 x 10 2 , with one byte used to store the exponent (2) and two
    bytes used to store the three significant digits of the mantissa (4, 1, 2). Negative
    numbers include the sign in their length.
    Taking this into account, the column size in bytes for a particular numeric data
    value NUMBER ( p), where p is the precision of a given value, can be calculated
    using the following formula:
    ROUND((length( p)+ s)/2))+1
    where s equals zero if the number is positive and s equals 1 if the number is
    negative.
    Zero and positive and negative infinity (only generated on import from Version 5
    Oracle databases) are stored using unique representations. Zero and negative
    infinity each require one byte; positive infinity requires two bytes.
    null

Maybe you are looking for

  • Application custom expiration date

    I have a iOS project (deployed as Adhoc) with requirements / restrictions: 1."custom expiration date" : app wouldn't launch after period of time after installation. The requirement "custom expiration date" like usual provision profile, but instead of

  • Quicktime cannot connect to YouTube

    I am trying to share a video created in Quicktime with Youtube.  My Youtube username and password are saved both in Safari/Keychain and 1Password. I've pasted both username and password into a text file, to make sure I'm not making a typo error. When

  • Change firewall settings via terminal

    hi, I've got an old Powerbook that has a broken screen. Luckily I can access all my files and also ssh into the computer. Is it possible to open the firewall port 7001 via the command-line so I can use something like Desktop Transporter? Thanks for a

  • Audio stopped working after shut-down..?

    Now I cant hear anything; internet vids, iTunes, stored movies..? When I push the volume-up button I see the bars move, indicating higher volume, but I no longer hear the cute little "beep beep" when I do it. Can't hear anything at all.... Craig

  • Tracking the workflow in running status

    HI guys,              My workflow will trigger , when ever a SO is posted in Va01.So once the user goes to Va02 and changes the same SO which is in running status.A warning message has to be displayed like ' Workflow is running  and its in approval p