1 Reply Latest reply on Feb 14, 2015 8:12 AM by philmodjunk

    Weighted average summary value

    Kaps_1

      Title

      Weighted average summary value

      Post

      Hello,

      I have a table called stock with three fields cost exc VAT, price inc VAT and:-

      margin = price inc VAT/cost exc VAT

      On my layout (based on the table stock) i have a trailing grand summary part, where I need to have three summary fields :-

      1) Summary total of cost exc VAT - which I have done

      2) Summary total of price inc VAT - which I have done

      3) Summary Mark Up - whiich mathematically needs to be  the ratio of the two summary fields. However as you can't use summary fields in calculations, I am stuck. can anybody see how to acheive this ? Thanks

      regards

      kaps

       

       

        • 1. Re: Weighted average summary value
          philmodjunk

          But you can use summary fields in calculations. Do it all the time.

          If you use a summary field in a calculation, it's evaluation context may differ from that of a summary field put on the layout if it is located inside a sub summary layout part, but that does not mean that you cannot use a summary field in a calculation. Summary fields used inside a calculation return a "grand total" result unless you use the GetSummary function to access subtotals produced by sorting your records much like you can by putting summary fields inside a sub summary layout part.

          I suspect, however, that the issue here is in that phrase "weighted average", can you explain more fully why you can't use the summary fields in a calculation?