How do I calculate averages in a form?

Hi All,
I'm throwing myself on the mercy of the forum.
I'm new to form building and I don't know javascript.
I'm working on a form and I can't seem to get it right.
When I first enter values it seems to be working, but if I make corrections or changes the calculations go bad.
I'm sure there is an easier/better way to calculate averages in a form.
I think I need either a calculate/re-calculate button, or better javascript that processes the math line by line.
I'm getting too close to the deadline to keep futzing around with it.
Would anyone care to have a look at my form and help me?
Here are the details...
I'm using Acrobat 9 Pro
I, and the administrators, are using Adobe Reader X. (10.1.4)
I'm using a Macintosh running OS X (10.7.4, Lion)
Teacher Evaluation Form:
Teachers demonstrate proficiency in four domains.
Evaluators assign scores (-, N, 0, 1, 2, and 3) to a number of items in each domain.
N indicates the item is Not Applicable.
A dash - indicates a score hasn't been given yet.
Each domain has a weight value to be calculated into the final score.
My job is to create a form that calculates the raw average and the weighted score for each domain, then a total for the performance evaluation total.
What I did.
I created:
A drop down field to score each item under each domain.
A hidden field that decides if the field for each item has a true number or another character.
A hidden field that sums the scores of all the items in each domain.
A hidden field that sums the number of fields that have a numeric value.
A field that divides the total of the values from each domain and divides it by the number of of fields with numeric values to get the raw average.
A field that multiplies the raw average by the appropriate amount to get the weighted score for each domain.
Finally, a field that sums the weighted scores to produce the final evaluation total.
Again, it seems to work at first, but if any changes are made to the scores the math goes bad.
Here is a download of the form with all the hidden fields visible so you can see what is happening.
https://dl.dropbox.com/u/783012/2_Evaluation%20Form.pdf
Please help me!

There are several problems with the calculation script for the "Test Total" field. Be sure to have the following user preference set: Edit > Preferences > JavaScript > Show console on errors and messages.
Also check that the field calculation order is correct.

Similar Messages

  • PDF Form Field calculates AVERAGE incorrectly

    I have a PDF Form field that is set to calculate the AVERAGE of 4 other fields. Each of those other fields has its validation set to allow only the values 1 through 3.
    The Average field is dividing the total by 4 even if a person only fills out 2 of the fields. I thought AVERAGE would only count the fields that have a value in them. But it's seeing the ones that are blank as containing a 0, even though that is an invalid value for that field.
    How can I fix this? The customer really wants the option of having up to 4 fields and wants an average of just the ones that are filled in. I thought that was what Average was supposed to do.
    Is there a way to tell Acrobat to ignore the fields if their value is less than 1?

    I responded to this question here: http://answers.acrobatusers.com/PDF-Form-Field-calculates-AVERAGE-incorrectly-q13211.aspx

  • How to calculate Average balance for an account

    Hi,
    How to calculate average balance for an account for a particular period say for JAN-12 period and after the end of that period for another two days 01-feb-12 and 01-feb-12 ?
    I'm using the following query :
    SELECT cc.segment1||'-'||cc.segment2||'-'||cc.segment3||'-'||cc.segment4||'-'||cc.segment5||'-'||cc.segment6 "Account_XX",
    nvl(sum(l.accounted_dr - l.accounted_cr),0) "Balance"
    FROM gl_code_combinations cc,
    gl_je_lines l
    WHERE cc.code_combination_id = l.code_combination_id
    AND l.set_of_books_id ='XX'
    and code_combination_id = replace it with code combination_id for account_xx
    AND l.effective_date <= '31-Jan-12' (january period end ??)
    GROUP BY cc.segment1||'-'||cc.segment2||'-'||cc.segment3||'-'||cc.segment4||'-'||cc.segment5||'-'||cc.segment6
    There are some discrepancies in "average balance" after end of month (Jan-12)?
    How to calculate average balances for a particular account (Account_XX above)from end of month of Jan to first two days of february?
    Thanks,
    Kiran

    Kiran,
    Please let me know first, is Average Balancing feature enabled in your GL Ledger?
    Regards
    Muhammad Ayaz

  • How do u calculate total of a field in forms

    how do u calculate the total of a field in forms which u are entering and then compare it with a particulat amount so that it is not more than that amount.
    Message was edited by:
    user521989

    I tried using this query, (it is just an example). in the 'key-next-item-trigger'.....but it takes directly from the database , i want it to take the values that i enter in the form and total those values, but like i said it takes all the stored values from the database and then totals it. could you suggest something
    post;
         declare
         x number:=0;     
         begin
         select sum(salary) into x from dept;
              message(x); pause;
         IF x > 5000 THEN
              message('cannot be greater than 5000');
              raise form_trigger_failure;
         end if;
         end;

  • How to calculate average in result in BEx

    Hi Expert,
    I have 2 fields one is project and another # of days to finished project (I used formula to calculate the # of days from start to finished date. NOw in result need to calculate average of days took to finished all projects.
    I belive formula will be ( # of days / projects) but how we can apply in query. If anyone know please help out I really appericiate.

    Hi,
    Right click on your formula and go to properties, there you have the options as "Calculate Result as" and "calculate single value as" from the drop down box you can select option as "Average".
    Regards,
    Durgesh.

  • How can i calculate the average in java

    how can i calculate the avergae mark out of two marks for instance in like exam mark out
    of two other ones
    thanks for considering this message

    Average or Mean:
    sum_of_N/N
    Here N is the number of marks.
    sum_of_N is the total sum of n(all marks added together)
    public int average(int[] marks) {
    int sum;
    sum = 0;
    for(int i=0;i < marks.length;i++) {
    sum=marks[i]+sum; // keep adding to the total
    return average = sum/marks.length;
    // warning- using an int here can be a pitfall(we could have a decimal outcome).
    }

  • How to calculates averages and send to a file?(source code)

    how to calculates averages and send to a file?(source code) I need to get started but I don't know where to begin...........the book I have doesn't really say how to handle averages and send to a file.................anybody got suggestions on how to get started? I am a newbie so place in layman's terms.............thanx

    To calculate an average: add all of the numbers together and divide by how many numbers you added together.
    ex: (1 + 2 + 3 + 10)/4 = 4 (4 is the average)
    As for writing them to a file, look over the API for random or sequential access files.

  • How the LMS 4.2 calculate average interface Utilization

    Hello!
    I have interface Tunnel1 with bandwidth 5000.
    How the LMS 4.2 calculate average interface RxUtilization or TxUtilization on this interface?

    Hi ,
    Below is how LMS calculates this value:
    RxUtilization = (ifInOctets*8*100)/ifSpeed   
    TxUtilization = (ifOutOctets*8*100)/ifSpeed
    Thanks-
    Afroz
    ***Ratings Encourages Contributors ***

  • How do i calculate the average of runs that have variable number of samples?

    Hi
    I am trying to calculate the average trajectory from  lets say 4 runs, with varying sample size.
    That is, if the the 4 runs have 78,74,73,55 samples respectively, How do I calculate the average of (78+74+73+55)/4 , (78+74+73)/3 and (78+74)/2  and 78/1 ?
    Thank you

    I'm not sure you gave a sufficient information. Assuming that you just want to calculate a linear average of the data collected in consecutive runs, you have two simple methods :
    1/ concatenate the data before calculating the mean.
    Simple, but can occupy a huhe amount of space since all the data have to be stored in memory
    2/ store only the means Mi and the corresponding number of data points ni and calculate a balanced mean : M = sum (ni x Mi) / sum (ni) )
    The attached vi illustrate both methods.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Averages.vi ‏40 KB

  • How to calculate Average time from a date field

    Hi All,
    I have a date type field in my table .
    I want to calculate average time for a given country in a select query. Date has to be exculded. Only time has to be taken into consideration.
    Kindly help me.
    Sample data
    india 25-JUN-09 08:12:45
    india 25-JUN-09 09:01:12

    Take which one you want.WITH dates AS
      (SELECT sysdate x FROM dual
        UNION
       SELECT sysdate + 1 +1/24 FROM dual
    SELECT TO_CHAR(to_date(AVG(to_number(TO_CHAR(to_date(TO_CHAR(x,'HH24:MI:SS'),'HH24:MI:SS'),'sssss'))),'sssss'),'hh24:mi:ss')
       FROM dates;
    WITH dates AS
      (SELECT sysdate x FROM dual
        UNION
       SELECT sysdate + 1 +1/24 FROM dual
    SELECT floor(24 * AVG(x- TRUNC(x)))
      || ':'
      || floor(mod(24 * AVG(x- TRUNC(x)),1) * 60)
      || ':'
      || floor(mod(mod(24 * AVG(x- TRUNC(x)),1) * 60,1) * 60)
       FROM dates;By
    Vamsi

  • How to calculate average if some of measure values are 0

    Hi
    I created a webI report on top of a Bex query, I have a more than 10 different measure in WebI report column on which i need to calculate average.
    If I  use the Average function provided with in WebI report it is calculating average for the measures which are having 0  values too, but i need to calculate average on a column only for those values which are not 0
    Ex:  Measure Quantity has values in the report like
    100
    100
    0
    100
    100
    Average function is calculating as 400/5
    but I need 400/4, because one of the value is 0, so i need to avoid that count which is zero and should divide it by 4 but not 5.
    One way is to custom create measure for all measures and make a if else condition and divided by that custom measure, but is there any other procedure?

    i hope this can help
    =Average([myMeasure]) Where ([myMesyre] <> 0)
    good luck
    Amr
    before the 0 add <> not Equal too sign < and >
    Edited by: Amr Salem on Jan 19, 2011 9:29 AM
    Edited by: Amr Salem on Jan 19, 2011 9:30 AM

  • How to calculate Average of Keyfigure

    Hi Gurus,
    I have a requirement where I have to calculate average of key figure value for 1 material.
    I tried using 'Average' in exception Aggregation but it just sums up everything.
    Can anyone please explain?
    Thanks

    Hi
    1. Include the key figure you want to average into the columns; call it KF1
    2. Create a Formula; call it CTR1, and in the detail view put a 1. (This 1-value is not used except to avoid an error in the formula syntax checker.) On the Aggregation tab, choose Exception Aggregation: Counter for all Detailed Values, and for the Ref. Characteristic, choose the same characteristic as the lowest level characteristic in the initial view of the output. E.g. if you only have 0CALMONTH in the output, choose 0CALMONTH. When you run this, the total at the bottom of this column should be equal to the number of rows in that column. Note that we use Exception Aggregation here so that the total at the bottom is calculated before the output is generated and is available to other formulas in the query design; if we were to use the Calculation tab it would look the same to us in that the total would appear at the bottom, but the calculation would occur too late for us to use within the query.
    3. Create a second formula, call it AVG1. The formula will be:
    SUMGT KF1 / SUMGT CTR1
    SUMGT accesses the Overall Result value at the bottom of the KF1 and CTR1 columns. You can find the SUMGT function in the Data Functions folder - turn on technical names first; the description is Overall Result. You could instead use SUMRT; the difference is that SUMGT will use the filters applied in the filter block; SUMRT will ignore them.
    3. Run the query. You should see the Average in every cell in the Average column. You can use this formula as input to another formula, or just use ( SUMGT KF1 / SUMGT CTR1 ) within a formula to access the average value.
    Thanks

  • How to use aggregation -Average using a class

    Hi Gurus,
       In my report i have used cl_salv_table  and for event i have used cl_salv_events_table, now i want to calculate average for some of the fields as such subtotal calculation . In my normal alv reports i have used the class lcl_event_receiver also, but for the report which iam using a class , i d'not know how to compain both the class  (i.e) cl_salv_table, class lcl_event_receiver. Help me to solve the problem.

    cancelled

  • How can I calculate disk space/DB space and storage spaces.

    Hi all,
    How can I calculate space clauses and memory related parameters for tables and table spaces? Updation is not allowed in these tables.
    I have to create a database also.
    I expect a reply with examples.
    [email protected]
    [email protected]
    Thanks for all replies .

    Boby,
    The formula to estimate the storage parameters for tables and indexes are the following:
    Table size = db block size * (# of Estimated rows in 12 months * average row length)/(db block size-90) *(1-PCTFREE/100)
    Let assume that you want to create a table called Jose_tab,
    db block size = 4092
    Estimated row length in 12 months = 1000
    Average row len = 100
    PCTFREE(Updation is not allowed) = 0
    Then, your INITIAL storage parameter will be estimated as follows:
    4092*1000*100
    (4092-90)*(1-0/100)
    = About 10M
    Your create table command will look like this,
    CREATE TABLE jose_tab
    (col1 VARCHAR2(10), col2 NUMBER(2),
    ....coln VARCHAR2(100))
    STORAGE(INITIAL 10M NEXT 10M
    PCTINCREASE 0)
    PCTFREE 0 PCTUSED 80
    TABLESPACE tablespace_name;
    Storage parameters for tablespace depends on the amount of disk space available. You can ignore tablespace storage parameters since the size of the tablespace is determined by the size(s) of the data files. Refer to the DBA manual for details.
    John

  • How can i calculate the percentile rank?

    How can I calculate where in percentile terms a single value falls within a array of many values?
    In excel it is:
    5
    10
    12
    11
    26
    18
    14
    11
    16
    19
    =PERCENTRANK(A1:A10,10) = 0.111
    Thanks!

    Average or Mean:
    sum_of_N/N
    Here N is the number of marks.
    sum_of_N is the total sum of n(all marks added together)
    public int average(int[] marks) {
    int sum;
    sum = 0;
    for(int i=0;i < marks.length;i++) {
    sum=marks[i]+sum; // keep adding to the total
    return average = sum/marks.length;
    // warning- using an int here can be a pitfall(we could have a decimal outcome).
    }

Maybe you are looking for

  • How to find a specific string in Entire database?

    Well i know this question is posted numerous times here but i m complete noob understanding the solution given on the net. Let me introduce the entire scenario . We have an application, which keeps on sending emails from an X employees account. We ar

  • I've been trying to install itunes on windows 7 but apple mobile device will not install

    I've finally managed to narrow the problem down to the following file: C:\Users\xxxxx\AppData\Local\Temp\Rar$DIa0.119\AppleMobileDeviceSupport64.msi: The archive is corrupt this is the file delivered with itunes and it's definitely causing the proble

  • Can't Mount Second Partition on External Hard Drive

    I have a 1 TB Seagate External HD that I have two partitions on...a 700 GB one for Time Machine and 300 GB for my personal files (called Nick's External). I was initially having trouble with it and transferred the files from the Nick's External parti

  • MBP 1,1 Running faster than MBP 2,2?

    We have two older MacBook Pros that the kids use. One is a first generation MacBook Pro 1,1 (January 2006) - Core Duo 2GHz - 667 bus - 2G RAM - ATY Radeon X1600 - 2MB L2 Cache The other is a MacBook Pro 2,2 (late Oct 2006) - Core 2 Duo 2.33GHz - 667

  • Inconsistency between Condition Base Value in Rebate Monitor / Semi .....

    Hi All, there  is a big problem in Inconsistency between Condition Base Value in Rebate Monitor / Semi Automatic Bypass / MIS. We have discovered issues with inconsistent figures. Condition Base Value Rebate Monitor until Feb 29th is not equal with v