Math calculation problems

My Timeline of the Universe needs fixing. I have hobbled together something that works so-so, but the attached swf shows the flaws.
Assistance much appreciated.

If you explain the issue in more detail and provide the calculations that are not working you might get better results.  Most people are not going to spend time searching thru a file to try to see what is wrong.  I looked thru it briefly and the problem isn't obvious to me.

Similar Messages

  • Math calculation problem! - Where is the help? ? ?

    I posted the message below hoping someone would be able to help - so far nothing!
    For sure there must be someone out there that can open the designer, create three numeric boxes, set the objects to be time oriented only, and the last box having the appropriate Java script or FormCalc script to have it show the difference in time.
    The script I show below works just great - accept as noted. WHY? What modifications do I need to make to have it work 100% of the time?
    <<<< below is the orginal posting on the forum >>>>>>>>>>
    The following Java script is entered in as the "total time" calculation formula
    "this.rawValue = endingTime.rawValue - beginningTime.rawValue" however when the following times are inserted the calculation accuracy fails.
    beginning time: 1430
    ending time: 1700
    the total time becomes 2:70 rather than 2:30.
    The reason seems to be the time format in PM mode is reading as a numeric formula rather than a time formula. Therefore, the subtraction is standard borrowing and carrying (1700 becomes 1600 + 100 + 0) rather than time (1700 becomes 1600 + 60).
    Does anyone have a solution?
    I have also tried resolving the issue using "FormCalc" but with no success
    Please help!
    thanks,
    tom

    the accuracy is tottaly correct 1700 -1430 is 270 it is that simple however what your trying to do is subtract the milliseconds of one time from another and convert it back into that many milliseconds divided up into hours and minutes. So calm down and get the formcal refrence manual to help it is poorly written but it is a starting point.
    I think you want to do this set both of the fields startDate and EndDate to time/date fields this way you can lock the way information is entered set the display validation and binding patteren to HH:MM then set the binding tab to time from here your final box can be a text field or a date field doesnt matter so much then the easiest way to do this in Livecycle is to use form calc on the total time field
    set the script to formcalc and place it under the calculation event.
    if(startDate.isNull or endDate.isNull) \\ keep calculation clean
    then
    $ = 1 \\incase used with another calculation no errors
    else
    $=Time2Num(startDate.formattedValue, "HH:MM")-Time2Num(endDate.formattedValue, "HH:MM")
    endif
    you may have to do some tweaking to get the number that comes out as the format you want but this should lead you down the right path the Time2Num can be reversed using Num2Time also
    good luck

  • Acrobat Pro 6 Average Daily Production and Math.round problem

    Acrobat Pro 6 Average Daily Production and Math.round problem
    (Production.0) (154) (whole units) . (Production.1) (90) (fractional) / (divided by) 31 (days) results in (Average.0) (4)(whole units) . (Average.1) (10) (fractional) using :Math.round.� Noticed that 154 (whole units) . 85 through 99 (fractional) also show 4.10. (without Math.round : 5.00)
    Method:
    �Production.0� (whole units) . �Production .1� (fractional) / Days = (Average Daily Production) (�Average.0� (whole units) . (Average.1) (fractional)
    � Production.0 (value not calculated)�, � Production 1 (calculated) (event.value = util.printx("0099", (event.value)).substr(-2,2); � �Average.0 (value not calculate)�, and �Average.1 has following calculation:
    var punits = this.getField("Production.0");
    var pfrac = this.getField("Production.1");
    var average = 0.0;
    average = (punits.value + pfrac.value / 100) / this.getField("Days").value;
    this.getField("Average.0").value = average - average % 1;
    this.getField("Average.1").value = util.printx("0099", Math.round((average % 1 * 100))).substr(-2,2);
    �Math.round� appears to be a problem. Also, could you explain the purpose of �0099� . Anyway, why would 154.85 through 154.90 divided by 31 give 4,10. Also, their must be a better way, to find the average daily production. All you have to do is divided the production (whole. fractional) by the days, and display the average daily production as (whole. fractional). Any suggestions??

    There are a many loose ends in your question.
    First, I have never seen before a variable type called 'var'. Is it a java primitive or a class?
    Next, I cannot seem to find any class that has the printx method.
    When it comes to substr(-2,2), I get confused. First, I thought that it was a method of the String class, but I only got as far as substring(beginIndex, endIndex).
    If you really must break the production and average into pieces, try this:
    float average = (punits + pfrac/100) / days;
    int avg_units = (int)average;
    int avg_frac = (int)( (average - avg_units) * 100 );My guess is that util.printx("0099", x) formats x having two optional digits and two mandatory digits, showing 0-99 as 00-99, but allows to show numbers with three and four digits.
    154.85/31 = 4,9951612903225806451612903225806
    154.99/31= 4,9996774193548387096774193548387
    If you round the fraction of theese numbers multiplied by 100 ( = 99.51.. and 99.968...) you get 100, and this will be the output of printx. My guess for "4.10" is that substr(-2,2) returns the two first characters of the string, because the start index should not be zero. (According to java docs, substring throws an exception on a negative index, so what kind of class are you really using ??????)

  • About math calculation in form command

    i want to know  if  we can do math calculation in script form's command line?i try it by using define command ,but cann't get the result,i have to make sure if the command line have the function of math calculation?

    do ur calculations inside a subroutine and call ur subroutine in ur script.
    check this wiki on how to use subroutines inside scripts
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/external%2bsubroutines%2bin%2bsap%2bscript

  • Income Tax Calculation problem: Urgent Help Needed

    Dear Gurus,
    I am facing a unique problem. Our client has two incentives –
    1) Product Incentive
    2) Sales Incentive
    Every month incentive figures get changed. These two are Monthly Regular Income (Cumulations Class 24) i.e. included in annual tax calculation.
    Now for tax calculation, my client wants "Actual Earning" and "Estimated Earning for the rest of the year" to be different. But Income tax calculation in SAP (for the month of April 2007) takes Actual Earning and multiplied it by 12( i.e. 11+1) to calculate Estimated Earning. But my client wants this Estimated Earning to be different. 
    Now please let me know is this possible in SAP system and how to calculate this?
    Your help will be highly appreciated
    Waiting for an early reply.
    Thanking You,
    With Best Regards,
    Pratik

    Hi,
    I am not understand your problem give your mb then i talk to you
    mhpo

  • Sale Analysis Profit Calculation problem

    Hello
    I create sale Invoice having Qty 2 unit price 150 & tax code is VAT@4% then Base amount is 300 & Total Bill
    amt is 312.
    My purchase price for the same item is INR 100 so my Gross profit show on Bill is INR 100 & profit percent
    is 33.33%
    Customer will debit with INR 312
    But when Create Rate difference bill ie credit memo of INR 20 per uint ie Qty 2 Tax VAT@4%  (maintain
    drop ship warehouse in row level to can't reduce the qty)
    Customer will debit -41.60
    So Customer Debit balance is 270.40
    But when I run Sale analysis report the result shows that Gross profit INR 260 & Gross Profit % is 100%
    But actually i calculated manually the real Profit is INR 60 & Profit % should be 23.08 should be show in sale
    analysis
    So what i do to see the same result

    Hi
    There is some problem in sales analysis report in some of the sap versions. Refer the following documents.
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3030303130313637303426]
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3135383735363826]
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3136363835363426]
    Regards,
    Sudhir B.

  • Large numbers calculation problem (determinant calculation)

    Hello experts,
    I have really interesting problem. I am calculatig determinant in ABAP with a large numbers (in CRM 5.0 system).
    My formula for determinant is :
    FORM calculate_determinant USING    det      TYPE zsppo_determinant
                               CHANGING value    TYPE f .
      value =
        (  1 * det-a11 * det-a22 * det-a33 * det-a44 ) + ( -1 * det-a11 * det-a22 * det-a34 * det-a43 ) +
        ( -1 * det-a11 * det-a23 * det-a32 * det-a44 ) + (  1 * det-a11 * det-a23 * det-a34 * det-a42 ) +
        ( -1 * det-a11 * det-a24 * det-a33 * det-a42 ) + (  1 * det-a11 * det-a24 * det-a32 * det-a43 ) +
        ( -1 * det-a12 * det-a21 * det-a33 * det-a44 ) + (  1 * det-a12 * det-a21 * det-a34 * det-a43 ) +
        (  1 * det-a12 * det-a23 * det-a31 * det-a44 ) + ( -1 * det-a12 * det-a23 * det-a34 * det-a41 ) +
        ( -1 * det-a12 * det-a24 * det-a31 * det-a43 ) + (  1 * det-a12 * det-a24 * det-a33 * det-a41 ) +
        (  1 * det-a13 * det-a21 * det-a32 * det-a44 ) + ( -1 * det-a13 * det-a21 * det-a34 * det-a42 ) +
        ( -1 * det-a13 * det-a22 * det-a31 * det-a44 ) + (  1 * det-a13 * det-a22 * det-a34 * det-a41 ) +
        (  1 * det-a13 * det-a24 * det-a31 * det-a42 ) + ( -1 * det-a13 * det-a24 * det-a32 * det-a41 ) +
        ( -1 * det-a14 * det-a21 * det-a32 * det-a43 ) + (  1 * det-a14 * det-a21 * det-a33 * det-a42 ) +
        (  1 * det-a14 * det-a22 * det-a31 * det-a43 ) + ( -1 * det-a14 * det-a22 * det-a33 * det-a41 ) +
        ( -1 * det-a14 * det-a23 * det-a31 * det-a42 ) + (  1 * det-a14 * det-a23 * det-a32 * det-a41 )
    ENDFORM.
    Det values are also f type. Problem is, that for several numbers I got the right values and for another det values I got wrong values... I also try to retype variable value on type p, but without success. Maybe I used wrong types or there is some ABAP rounding of numbers which cause wrong result.
    Any good ideas of solutions. <text removed>. Thanks for your time.
    Edited by: Matt on Sep 14, 2010 9:17 AM

    Hi Lubos,
    phew! that sounds far from SAP scope, but from Maths' numerical methods. Let's see if I can remember something about my lessons at University...
    - One issue can arise when adding and subtracting terms which are very similar, because the error tends to arise quite fast. Try to add the positive terms on one hand, and the negative terms on the other hand, then subtract one from the other.
    - Please take into account that the determinant value can be significantly close to zero when the condition number of the matrix is low, that is, when the range is 4 but the whole determinant is close to 0. Instead, try a [Singular Value Decomposition|http://en.wikipedia.org/wiki/SVD_(mathematics)] or an [LU decomposition|http://en.wikipedia.org/wiki/LU_decomposition]
    I hope this helps. Kind regards,
    Alvaro

  • Math.sin() problem

    Hi!
    I need calculating sin in java but i need it in degrees and java doing it in rads. Anybody knows what can i do?
    Thanx!!!
    Max

    Maybe you should look through the API at that Math class. You're already using Math.sin() ... how could you have missed Math.toDegrees() and Math.toRadians() ???

  • [8i] Date/Time calculation problem...

    So, I am currently facing a situation where I need to calculate the total hours a workstation is in use for each day in a particular time period. I have a table with the log of each time each workstation is used. The problem is, a workstation can be used for any amount of time, starting on any day and ending on any day. This means that a particular entry in the log can span multiple days. I'm not sure how to split the difference between the end date/time of an entry and the start date/time of the entry over multiple days.
    Here's a sample table and some sample data for what I'm trying to do:
    -- Note: in reality, this table contains more columns
    CREATE TABLE     my_hrs
    (     record_id     NUMBER     NOT NULL
    ,     sdatetime     DATE     
    ,     edatetime     DATE     
    ,     workstation     VARCHAR2(4)
         CONSTRAINT my_hrs_pk PRIMARY KEY (record_id)
    -- Note: sdatetime, edatetime, and workstation CAN all be NULL, though I won't provide
    -- any sample data for these situations since I want to ignore them in my results
    -- Additionally, there are hundreds of workstations, but I'm only using 2 to simplify the sample data
    INSERT INTO     my_hrs
    VALUES (12345,TO_DATE('03/01/2010 08:00','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 13:35','mm/dd/yyyy HH24:MI'),'123A');
    INSERT INTO     my_hrs
    VALUES (13427,TO_DATE('03/01/2010 08:10','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 10:02','mm/dd/yyyy HH24:MI'),'321B');
    INSERT INTO     my_hrs
    VALUES (21543,TO_DATE('03/01/2010 14:07','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 16:30','mm/dd/yyyy HH24:MI'),'123A');
    INSERT INTO     my_hrs
    VALUES (22412,TO_DATE('03/01/2010 10:15','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 15:30','mm/dd/yyyy HH24:MI'),'321B');
    INSERT INTO     my_hrs
    VALUES (11976,TO_DATE('03/01/2010 17:00','mm/dd/yyyy HH24:MI'),TO_DATE('03/02/2010 02:30','mm/dd/yyyy HH24:MI'),'123A');
    INSERT INTO     my_hrs
    VALUES (34215,TO_DATE('03/01/2010 22:10','mm/dd/yyyy HH24:MI'),TO_DATE('03/02/2010 04:30','mm/dd/yyyy HH24:MI'),'321B');
    INSERT INTO     my_hrs
    VALUES (24789,TO_DATE('03/02/2010 13:00','mm/dd/yyyy HH24:MI'),TO_DATE('03/05/2010 02:30','mm/dd/yyyy HH24:MI'),'123A');
    INSERT INTO     my_hrs
    VALUES (31542,TO_DATE('03/02/2010 21:30','mm/dd/yyyy HH24:MI'),TO_DATE('03/04/2010 10:30','mm/dd/yyyy HH24:MI'),'321B');Based on my sample data above, these are the results I want to see:
    WORKSTATION     DATE          HRS_IN_USE
    123A          3/1/2010     14.96667
    321B          3/1/2010     8.95000
    123A          3/2/2010     13.50000
    321B          3/2/2010     7.00000
    123A          3/3/2010     24.00000
    321B          3/3/2010     24.00000
    123A          3/4/2010     24.00000
    321B          3/4/2010     10.50000
    123A          3/5/2010     2.50000
    321B          3/5/2010     0.00000Is this possible? (Please note, if the workstation was not used on a particular day, I want it to show 0 hours for that workstation for that day). Another thing to note is that I'm working with Oracle 8i.
    Thanks in advance for the help!

    Thanks, Frank, your explanation helped. My main problem was just that I couldn't picture what that line of the query was doing, even working from the inside out. I learn better through visual and hands-on methods, so to really understand, I had to look at the cross-join of a and h and go line by line. (In case there's anybody who looks at this post in the future and learns like I do, I've posted that data below).
    This definitely solves my problem!
    >
    By the way, this query is full of things that could be done better in later versions of Oracle. Generating table a is just one of them. Starting in Oracle 9, you can do a CONNECT BY query on dual to generate exacly how many rows you need. You never have to worry about an upper bound, and it's much faster than using ROWNUM. From time to time you might gently remind the people who decide these things that you're using a very old, unsupported version of Oracle, and that everyone could be more productive if you upgraded.
    >
    I could go on and on on this topic.... we have tried and continue to try to convince the powers that be to pay for the upgrades... if it were just Oracle that needed to be upgraded, we might actually have a chance at succeeding. As it is, ...ha.
    TABLE A (FROM SUB-QUERY)
    a_date          next_date
    3/1/2010     3/2/2010
    3/2/2010     3/3/2010
    3/3/2010     3/4/2010
    3/4/2010     3/5/2010
    3/5/2010     3/6/2010
    TABLE H (MY_HRS)          
    record_id     sdatetime     edatetime     workstation
    10000          2/28/2010 18:00     3/1/2010 5:30     123A
    12345          3/1/2010 8:00     3/1/2010 13:35     123A
    13427          3/1/2010 8:10     3/1/2010 10:02     321B
    21543          3/1/2010 14:07     3/1/2010 16:30     123A
    22412          3/1/2010 10:15     3/1/2010 15:30     321B
    11976          3/1/2010 17:00     3/2/2010 2:30     123A
    34215          3/1/2010 22:10     3/2/2010 4:30     321B
    24789          3/2/2010 13:00     3/5/2010 2:30     123A
    31542          3/2/2010 21:30     3/4/2010 10:30     321B
    CROSS-JOIN TABLE A WITH TABLE H                                             (and calculations done by the query below)     
    record_id     sdatetime     edatetime     workstation     a_date          next_date     LEAST (h.edatetime, a.next_date)     GREATEST (h.sdatetime, a.a_date)     GREATEST(TO_NUMBER(L-G),0)
    10000          2/28/2010 18:00     3/1/2010 5:30     123A          3/1/2010     3/2/2010     3/1/2010 5:30                    3/1/2010 0:00                    0.229166667
    10000          2/28/2010 18:00     3/1/2010 5:30     123A          3/2/2010     3/3/2010     3/1/2010 5:30                    3/2/2010 0:00                    0.00000
    10000          2/28/2010 18:00     3/1/2010 5:30     123A          3/3/2010     3/4/2010     3/1/2010 5:30                    3/3/2010 0:00                    0.00000
    10000          2/28/2010 18:00     3/1/2010 5:30     123A          3/4/2010     3/5/2010     3/1/2010 5:30                    3/4/2010 0:00                    0.00000
    10000          2/28/2010 18:00     3/1/2010 5:30     123A          3/5/2010     3/6/2010     3/1/2010 5:30                    3/5/2010 0:00                    0.00000
    12345          3/1/2010 8:00     3/1/2010 13:35     123A          3/1/2010     3/2/2010     3/1/2010 13:35                    3/1/2010 8:00                    0.23264
    12345          3/1/2010 8:00     3/1/2010 13:35     123A          3/2/2010     3/3/2010     3/1/2010 13:35                    3/2/2010 0:00                    0.00000
    12345          3/1/2010 8:00     3/1/2010 13:35     123A          3/3/2010     3/4/2010     3/1/2010 13:35                    3/3/2010 0:00                    0.00000
    12345          3/1/2010 8:00     3/1/2010 13:35     123A          3/4/2010     3/5/2010     3/1/2010 13:35                    3/4/2010 0:00                    0.00000
    12345          3/1/2010 8:00     3/1/2010 13:35     123A          3/5/2010     3/6/2010     3/1/2010 13:35                    3/5/2010 0:00                    0.00000
    13427          3/1/2010 8:10     3/1/2010 10:02     321B          3/1/2010     3/2/2010     3/1/2010 10:02                    3/1/2010 8:10                    0.07778
    13427          3/1/2010 8:10     3/1/2010 10:02     321B          3/2/2010     3/3/2010     3/1/2010 10:02                    3/2/2010 0:00                    0.00000
    13427          3/1/2010 8:10     3/1/2010 10:02     321B          3/3/2010     3/4/2010     3/1/2010 10:02                    3/3/2010 0:00                    0.00000
    13427          3/1/2010 8:10     3/1/2010 10:02     321B          3/4/2010     3/5/2010     3/1/2010 10:02                    3/4/2010 0:00                    0.00000
    13427          3/1/2010 8:10     3/1/2010 10:02     321B          3/5/2010     3/6/2010     3/1/2010 10:02                    3/5/2010 0:00                    0.00000
    21543          3/1/2010 14:07     3/1/2010 16:30     123A          3/1/2010     3/2/2010     3/1/2010 16:30                    3/1/2010 14:07                    0.09931
    21543          3/1/2010 14:07     3/1/2010 16:30     123A          3/2/2010     3/3/2010     3/1/2010 16:30                    3/2/2010 0:00                    0.00000
    21543          3/1/2010 14:07     3/1/2010 16:30     123A          3/3/2010     3/4/2010     3/1/2010 16:30                    3/3/2010 0:00                    0.00000
    21543          3/1/2010 14:07     3/1/2010 16:30     123A          3/4/2010     3/5/2010     3/1/2010 16:30                    3/4/2010 0:00                    0.00000
    21543          3/1/2010 14:07     3/1/2010 16:30     123A          3/5/2010     3/6/2010     3/1/2010 16:30                    3/5/2010 0:00                    0.00000
    22412          3/1/2010 10:15     3/1/2010 15:30     321B          3/1/2010     3/2/2010     3/1/2010 15:30                    3/1/2010 10:15                    0.21875
    22412          3/1/2010 10:15     3/1/2010 15:30     321B          3/2/2010     3/3/2010     3/1/2010 15:30                    3/2/2010 0:00                    0.00000
    22412          3/1/2010 10:15     3/1/2010 15:30     321B          3/3/2010     3/4/2010     3/1/2010 15:30                    3/3/2010 0:00                    0.00000
    22412          3/1/2010 10:15     3/1/2010 15:30     321B          3/4/2010     3/5/2010     3/1/2010 15:30                    3/4/2010 0:00                    0.00000
    22412          3/1/2010 10:15     3/1/2010 15:30     321B          3/5/2010     3/6/2010     3/1/2010 15:30                    3/5/2010 0:00                    0.00000
    11976          3/1/2010 17:00     3/2/2010 2:30     123A          3/1/2010     3/2/2010     3/2/2010 0:00                    3/1/2010 17:00                    0.29167
    11976          3/1/2010 17:00     3/2/2010 2:30     123A          3/2/2010     3/3/2010     3/2/2010 2:30                    3/2/2010 0:00                    0.10417
    11976          3/1/2010 17:00     3/2/2010 2:30     123A          3/3/2010     3/4/2010     3/2/2010 2:30                    3/3/2010 0:00                    0.00000
    11976          3/1/2010 17:00     3/2/2010 2:30     123A          3/4/2010     3/5/2010     3/2/2010 2:30                    3/4/2010 0:00                    0.00000
    11976          3/1/2010 17:00     3/2/2010 2:30     123A          3/5/2010     3/6/2010     3/2/2010 2:30                    3/5/2010 0:00                    0.00000
    34215          3/1/2010 22:10     3/2/2010 4:30     321B          3/1/2010     3/2/2010     3/2/2010 0:00                    3/1/2010 22:10                    0.07639
    34215          3/1/2010 22:10     3/2/2010 4:30     321B          3/2/2010     3/3/2010     3/2/2010 4:30                    3/2/2010 0:00                    0.18750
    34215          3/1/2010 22:10     3/2/2010 4:30     321B          3/3/2010     3/4/2010     3/2/2010 4:30                    3/3/2010 0:00                    0.00000
    34215          3/1/2010 22:10     3/2/2010 4:30     321B          3/4/2010     3/5/2010     3/2/2010 4:30                    3/4/2010 0:00                    0.00000
    34215          3/1/2010 22:10     3/2/2010 4:30     321B          3/5/2010     3/6/2010     3/2/2010 4:30                    3/5/2010 0:00                    0.00000
    24789          3/2/2010 13:00     3/5/2010 2:30     123A          3/1/2010     3/2/2010     3/2/2010 0:00                    3/2/2010 13:00                    0.00000
    24789          3/2/2010 13:00     3/5/2010 2:30     123A          3/2/2010     3/3/2010     3/3/2010 0:00                    3/2/2010 13:00                    0.45833
    24789          3/2/2010 13:00     3/5/2010 2:30     123A          3/3/2010     3/4/2010     3/4/2010 0:00                    3/3/2010 0:00                    1.00000
    24789          3/2/2010 13:00     3/5/2010 2:30     123A          3/4/2010     3/5/2010     3/5/2010 0:00                    3/4/2010 0:00                    1.00000
    24789          3/2/2010 13:00     3/5/2010 2:30     123A          3/5/2010     3/6/2010     3/5/2010 2:30                    3/5/2010 0:00                    0.10417
    31542          3/2/2010 21:30     3/4/2010 10:30     321B          3/1/2010     3/2/2010     3/2/2010 0:00                    3/2/2010 21:30                    0.00000
    31542          3/2/2010 21:30     3/4/2010 10:30     321B          3/2/2010     3/3/2010     3/3/2010 0:00                    3/2/2010 21:30                    0.10417
    31542          3/2/2010 21:30     3/4/2010 10:30     321B          3/3/2010     3/4/2010     3/4/2010 0:00                    3/3/2010 0:00                    1.00000
    31542          3/2/2010 21:30     3/4/2010 10:30     321B          3/4/2010     3/5/2010     3/4/2010 10:30                    3/4/2010 0:00                    0.43750
    31542          3/2/2010 21:30     3/4/2010 10:30     321B          3/5/2010     3/6/2010     3/4/2010 10:30                    3/5/2010 0:00                    0.00000
    (Then, the query sums up the last column in the "table" above, grouped by a_date and workstation).

  • Alternative sales commission calculation problem

    hi sir,
    I am a junior consultant trying to solve a problem for my Senior, the question goes as follows:
    We are trying to impute sales commissions to sales rep as a discount for every sale, in which for every sale a determined amount is imputed to the sales rep as a commission.
    the problem arises when the product is returned and customer asks for a refund. Then the commission should be refunded aswell. Could you please throw some light to wether we should clear that invoice the same month or the next one as a negative pendent discount, if so, how is the negative imputation applied?
    thanks a lot in advance,
    HF

    Bobsterslc wrote:
    Here is a screenshot of a piece of what I'm working on.
    Hi Bob,
    Here's what your screenshot looks like when embedded in a post, using the HTML code that Photobucket provides (third item in the list of codes provided).
    In your original post you said:
    I have a table that calculates sales commissions for a number of people and includes an overriding commission for the sales managers. I need to cap the sales commission at a fixed percentage, say 25%, for the sales people.
    I'm not sure what you mean by "I need to cap the sales commission at a fixed percentage."
    The first question that comes to mind is "25% of what?"
    Do you mean that the commission is not to exceed 25% of Total earnings?
    If so, your formula for B5 (the first cell where commission is calculated) would be:
    =MIN(formula1,B2/3)
    Where formula1 is whatever formula is used to calculate the commission when it is less than the cap, and B2 contains the salary/wages which must constitute at least 75% of the total compensation under this interpretation.
    Do you mean the commission rate is on a sliding scale that rises with increased sales, but does not exceed 25%?
    If so, you need to specify the rules that control the rate. Does it rise in steps? Does the 'new' rate at each step apply to total sales, or only to sales above that step? Are the steps the same size for everyone, directly related to the individual goals, or set by some other criteria?
    There's not enough information available fom your table to determine a pattern. For the first three columns, person B's commission is 12% of sales, person C's is under 4% and person D's is 30% of sales.
    For a more detailed response, we'll ned a more detailed specification of the question.
    Regards,
    Barry

  • Date Difference Calculation problem

    I am creating a form which should calculate the number of days between two calender dat
    es using the Date2Sum expression but my result cell gives me
    zeo despite setting the locale and the calculation correcttly. Where could
    my problem be?
    Darlington Sakwa

    Validate the date patterns on the date fields match the date patterns used in Date2Num. For example, the attached has a start date with the display date pattern date{YYYY-MM-DD} and that matches the date pattern in my Date2Num function call.
    // form1.page1.startDateNum::calculate - (FormCalc, client)
    if (form1.page1.startDate.isNull) then
      $.rawValue = ""
    else
      $.rawValue = Date2Num(form1.page1.startDate.rawValue,"YYYY-MM-DD")
    endif
    Steve

  • Y-intercept calculation problem: "A2:A7" isn't a valid reference

    This is actually a problem I have with many calculations in Numbers but I will use the following as an example:
    I am trying to calculate the y-intercept and slope for a set of data. Table 1 contains the raw data with each data point in triplicate. In Table 2, column 1 is the ordinate value and column 2 is the abscissa value, which is the average of the triplicates. I would like to place the calculation for the y-intercept in column 3 and the slope in column 4, but always get the error, "A2:A7" isn't a valid reference" for a result. Instead, I have to have a third table for just the y-int and slope. Why isn't A2:A7 a valid reference?

    No, I didn't; I only had a 5 rows but I made it 7 rows - so it was a 4 column x 7 row table - and then the formulas worked. The odd thing is that there was still only data in the first 5 rows and, after I set up the formulas, I reduced the table back to 4x7 and the formulas remained unchanged. Thanks for the help.

  • Calculation Problem help solution needed quickly

    I have created an adobe acrobat registration form in Adobe LiveCycle.  I've worked on this all day and needed to distribute today.  I can not find out what the problem with my code is.  I need a discerning eye right away if possible.  The calculated fields are on page two.  The right column TotTour, TotMDin, TotWDin & then TotDue
    Nikki

    Paul the problem was solved by someone else.  When I posted another post.  This is the answer I got, which worked.
    Nothing wrong with your code.
    Simply go to the Row1[0] and uncheck the "Repeat Row for Each Data Item" option
    Nikki

  • Plan Cost calculation problem

    Hi friends,
    I am facing problem in Plan costing part. When I run KOC4, & see Material Overheads, activity cost, it shows 0 agst Paln, but calculated agst Actual Cost.
    Is there any option to run for all plan order recalculation of costs in one go. If yes, what & how????
    regards
    Vikas

    Hi Amit,
    Thanks for your reply. I confirmed with my basis team that this note is already implemented in system but still we are facing this error.
    If any one help in this regard that will be really appreciable.
    Regards,
    AVI

  • HELP!!!  math.random() problem

    Hello,
    I was wondering if anyone can help me with a problem I'm
    running into using the math.random(). I'm using Flash CS3 and
    created a very simple script to select random frames in a simple
    movie. It works as expected in the CS3 environment and in Safari
    but it doesn't work correctly in Firefox or in the DotNetNuke
    module I am using. Here is the code:
    i = Math.ceil(Math.random() * 3);
    gotoAndPlay("Image"+i);
    I would appreciate any help you can provide.

    Remember that Math.random() function returns a positive double value between 0.0 and 1.0. For a better definition you can refer to the Math class in the API.
    Since this is an assignment, I am not going to give you the code but I'll just tell you how you should be going about solving this.
    Now you have two limits right? What you can do is, multiply the smaller of the two numbers (I guess in your case its going to be the top) with the random number generated by the Math.random() function. Just add a check to see if this result is lesser than the maximum limit. If yes, then go ahead and add that number to the array. If not, just repeat the same thing.
    I hope you got the idea. If you still have problems, please let me know.
    Plutaurian

Maybe you are looking for

  • To display the data in excel

    hi frens, I want to display the output list in excel format.i.e when f8 is pressed, excel is displayed.Iam able to diplay the data in first 3 tabs.but when coming to the fourth tab it is dispalying the error saying 'error while reading the object pro

  • How can I get my photos to save the GPS location for iPhoto?

    I noticed that the info on my photos uploaded from my iphone 3G is not marking their location on the map. How can I activate this feature so the GPS location of the photos taken is saved to each photo's info in iPhoto after I upload it? Thanks!

  • Does Apple provide "pay" support.

    It's beginning to look like my issues require contacting someone proficient with iTunes on a PC whom I can speak to directly. The whole -support-service-by-responding- to-prompts falls apart at the very end - in everything I've tried you have to prov

  • MPLS PE IOS for 6500?

    I apologize as this is kind of a "Out There" request. I'm setting up my first "service provider" type MPLS network consisting of several 6500s and ASRs. I've been looking around for a while now for a good IOS to load on the 6500s that will support a

  • My Macbook does not load when I turn it on

    My macbook froze and was making a faint buzzing sound, so I turned it off by pushing and holding the power button. When I turned it on, the grey screen popped up and nothing came on it for about a minute. Then a folder with a question mark in the mid