8 Replies Latest reply: Mar 16, 2012 6:48 AM by qlik_techie RSS

    How to sum all the values in a column

    mm311ton

      My table looks like this:

       

      HouseCatsDogs
      % Total of Cats (PTC)
      Dog/Cat Ratio (CDR)
      WAC
      -4535100%- .7711
      House 1102022%2.44
      House 2151033%.67.2211
      House 320544%.25.11

       

      The calculations I'm using are as follows:% Total Cats (PTC)

       

      HouseCats
      Dogs% Total of Cats (PTC)Dog/Cat Ratio (DCR)WAC
      -sum([Cats])sum([Dogs])sum(Sum([Cats]) / (sum(total [Cats])))-**need to figure out how to sum these values and re-use that value**
      [House][Cats][Dogs]Sum([Cats]) / (sum(total [Cats]))[Cats] / [Dogs]

      (Sum([Cats]) / (sum(total [Cats])))

      *

      ([Dogs] / [Cats])

       

      Read WAC as total percentage of cats times dog/cat ratio.

       

      What I need to do is figure out how to sum the values in the WAC column. I can't get QlikView to do that for me - in other words I can't get QlikView to calculate and show the .7711 value demonstrated above. Not only do I want to sum these values, but I want to re-use the sum value later on in another chart. So later on I want to multiply something by the .7711 value.

       

      I'm sure this seems bizarre and maybe there's even an easy answer that I'm just missing. But I can't figure out how to write the expression to total the WAC values for me. Can someone please help? I sincerely appreciate any guidance you can provide. Thank you!