2 Replies Latest reply on Sep 4, 2017 7:38 PM by Glenn Page

    Calculated Field

    Glenn Page

      Hi There,

       

      Novice Tableau user...and first time posting to the community so thanks for your patience!

       

      I'm trying to create a field that separates 'In Trade Area (Excl Centre)' spend versus 'In Trade Area (Incl Centre)' - See excerpt from sheet below.  Further, I would like to filter again by postcode.

       

      I've tried the following:

       

      IF [InTA (Excl Centre]) = 0

           THEN TOTAL(SUM([CashAdjustedSpend])

      END

       

      I get the "Cannot mix aggregate and non-aggregate comparisons or results in IF expressions".

       

      Where am I going wrong?

       

        

      TradeAreaAgeBandCategoryPostcodeCashAdjustedSpendRankingInTA (excl Centre)
      MTA15 to 24All Retail2164$35,250,000.0000
      MTA15 to 24All Retail2170$21,160,000.0010
      MTA15 to 24All Retail2150$15,420,000.0020
      MTA15 to 24All Retail2000$15,290,000.0030
      MTA15 to 24All Retail2165$14,590,000.0041
      MTA15 to 24All Retail2164$9,790,000.0051
      MTA15 to 24All Retail2177$6,540,000.0061
      MTA15 to 24All Retail2170$4,960,000.0070
      MTA15 to 24All Retail2160$4,780,000.0080
      MTA15 to 24All Retail2166$4,330,000.0091
      MTA15 to 24All Retail2164$4,030,000.00101
      MTA15 to 24All Retail2176$3,450,000.00111
      MTA15 to 24All Retail2168$3,410,000.00121
      MTA15 to 24All Retail2750$2,810,000.00130
      MTA15 to 24All Retail2170$2,770,000.00140
      MTA15 to 24All Retail2165$2,770,000.00151
      MTA15 to 24All Retail2560$2,380,000.00160
      MTA15 to 24All Retail2171$2,290,000.00171
      MTA15 to 24All Retail2166$2,150,000.00181