2 Replies Latest reply on Jun 19, 2012 10:04 AM by Bryce Cazier

    Make Calculation Null Based on Dimension Field

    Bryce Cazier

      I have a data set that contains industry information at the Segment, Sub Segment and Sub Sub Segment level.  All of the calculations in a given table have data down to the Sub Sub Segment level except one.  How would I adapt a case statement to force the calculation to null if the Sub Sub Segment Dimension is added to the rows shelf?  I want something like the statement below I am just not sure how to do it correctly.  Or perhaps this would be the appropriate place for a parameter..?

       

      CASE

      WHEN [Industry Sub Segment]

      THEN (sum([2011 UPS ADV_Actual])/sum([2010 UPS ADV_Actual]))-1

      WHEN [Industry Segment]

      THEN (sum([2011 UPS ADV_Actual])/sum([2010 UPS ADV_Actual]))-1

      ELSE NULL

      END

       

      Tableau Example.jpg