3 Replies Latest reply on Aug 28, 2014 11:20 AM by philmodjunk

    Calculation issue

    gjbdjc

      Title

      Calculation issue

      Post

           I'm creating a report for production totals.

           I have production lines that may have 1,2 or 3 operators at any given time. I have the following calculations:

           Operator 1 hours + Operator 2 hours + Operator 3 hours = Shift Labor Hours

           Summary Field of Shift Labor Hours = Total Shift Labor Hours

           I want to get my total Pounds Produced per Labor Hour, but when I divide Total Good Pounds / Total Shift Hours

           I get a crazy number, looks like it's giving me the grand total number? 

      Untitled.jpg

        • 1. Re: Calculation issue
          philmodjunk

               what does each row of numbers in this screen shot represent?

               A single record, a group of records in a sub summary layout part or are the multiple rows of data here all from the same record?

               Are you using just calculation fields or also a summary field?

          • 2. Re: Calculation issue
            gjbdjc

                 See Attached

            • 3. Re: Calculation issue
              philmodjunk

                   That's what I suspected, but it wasn't clear in your original post that I was guessing correctly. When you refer to a summary field in a calculation, you get a grand total figure, not a sub total like you see in the sub summary layout part.

                   The solution is to use the GetSummary Function instead of just dividing one summary field by another.

                   GetSummary ( Total Good Pounds ; Break Field ) / GetSummary ( Total Manhours ; break field )

                   Your "break field" will be the same field that you specify as the "sorted by" field for the sub summary layout part that shows the sub total you want to use in your calculation.

                   Note: one key limitation to get summary is that the break and summary fields used in it have to both be defined from the current layout's table.