8 Replies Latest reply on Sep 20, 2016 9:39 PM by Mahfooj Khan

    How to perform a row level calculation first then sum the result

    Wayne Ooi

      Hi,

       

      I am trying to perform a row level calculation first then sum the result but Tableau aggregated the Mark and Score Index then calculate them.

      From the screenshot (Tableau) I would like the Grand Total for Scor77.5 (i.e. summation of Mark * Score Index of each customers).Data:

       

       

       

      Tableau:

       

      Calculated Field 1: Score Volume

      // This is dynamic as it depends on Mark

      // i.e. if Mark is not more than zero then the Score Volume will be zero

      IF [Mark] > 0

          THEN [VOLUME]

      ELSE

          0

      END

       

      Calculated Field 2: Score Index

      SUM([SCORE VOLUME]) / TOTAL(SUM([SCORE VOLUME]))

       

      Calculated Field 3: Score

      SUM([Mark]) * [SCORE INDEX]

       

       

       

      Really appreciate if someone can show me how to achieve this.

       

      Thanks,

      Wayne.