7 Replies Latest reply on May 22, 2014 3:18 PM by TKnTexas

    Calculation Not working out

    TKnTexas

      Title

      Calculation Not working out

      Post

           I set up my structure with the project name, and a number of task I want to follow to completion.  

           TASK_Number1 = yes (when done) Blank until then.

           TASK_Number1_value = If ( TASK_Number1 ) = "yes" , 1 , 0 )

           I can do math on the xxxxxxx_value fields to get an average or a sum.  Average gives me percentage of completion.  As I think of another specific task I do not want to overlook I can add the proper two fields do the structure, and adjust the calculations.  

           As seen on the screen print the first two records do not give consistent responses.  In creating I did copy/paste to specifically have proper calcs.

        • 1. Re: Calculation Not working out
          TKnTexas
          /files/3297d32d47/Screen_Shot_2014-05-21_at_8.24.05_PM.png 896x684
          • 2. Re: Calculation Not working out
            philmodjunk

                 is the "do not evaluate if all referenced fields are empty" check box cleared or selected for these calculation field?

                 Average ( <emptyField> ; 3 ; <emptyField> )

                 will evaluate as 3 instead of as 1 and you may be getting null (empty) results if that field does not have any value selected.

                 Also, does Test return the correct total?

            • 3. Re: Calculation Not working out
              TKnTexas

                   I went through and unchecked the "Do not Evaluate . . . " option.  There is not change in the reflection of the options.  Phone Format for record 1 and record 2 are both checked YES , yet the value of the field is not the same.  Both records should have a total of 8 (the right most field) or an average of 1.

                    

              • 4. Re: Calculation Not working out
                philmodjunk

                     Have you checked the values returned by each of the calculation fields using the Left function to return either 1 or 0?

                     To repeat, do you get consistently correct totals in the Test field?

                     Where the check box fields originally formatted differently? (The box can show as selected even though other data precedes it in the field. This will then affect the result of your calculation field when the first letter is not a "y".)

                • 5. Re: Calculation Not working out
                  TKnTexas

                       Under the heading there is the Text Field and the value field.    For the first two project YES is chosen so all of the 2nd fields should be ONE and the results do not show this.  

                       PHONE FORMAT has is YES for first two projects and yet one shows a value of ONE and the other shows a value of ZERO.  That is so confusing.

                  • 6. Re: Calculation Not working out
                    philmodjunk

                         And that's what I have been working towards. If you make a copy of that field and format it as an edit box, I predict that the second record shown will have the check box's specified value "yes"?, but not as the first line of text in the field. I suspect that you have some other text, at least a return character preceding it it in that field and thus the calculation field does not return the expected result.

                    • 7. Re: Calculation Not working out
                      TKnTexas

                           I changed to Edit Box.  Expanded the field to see more than one line.  There was more than what I thought.  You are an amazing guru Phil.  Thanks.