3 Replies Latest reply on Aug 10, 2018 3:50 AM by Colm O'Shaughnessy

    Trouble with an LOD if-then calculation

    Colm O'Shaughnessy

      Hi all,

      Anyone know the issue with this? Example of the data below too.

       

      Note that MaxSum is calculated as {MAX( {FIXED [Region]: SUM([Sales])})}, similarly for MinSum.

       

      The expression causing the issue:

      { FIXED [Region]:

       

      if SUM([Sales])<=(ATTR([MaxSum])+ATTR([MinSum]))/2 then "Small"

       

      else "XL" end}

       

      My goal is to "split" the data depending on whether its within-region sales is less that the mean of the within-region max and min sales.

       

      Thanks in advance!

       

      RegionSales

      A

      5
      B3
      A4
      B4
      C1