1 Reply Latest reply: Oct 26, 2011 7:49 AM by Andrew11 RSS

    Problem combining Line Color and Set Analysis

      I've got a Line chart that uses a Set Analysis expression such as:


      sum({1<Year = {$(=Max(Year)), $(=Max(Year)-1),  $(=Max(Year)-2)}>} Sales)


      What I would like is to colorcode the years so that I can re-use the same colors for the same years in other objects. If I try something like:


      If (Year = 2005, red(),
      If(Year = 2006, green(),
      If(Year = 2007, blue(),
      If (Year = 2008, yellow())



      it only works if i explicitly select the three years in the fieldbox. But if I only select for example year 2007, the linechart would still show me lines for sales in three years (2007, 2006 and 2005) but since I've only explicitly selected year 2007 that's the only year that would be correctly color-coded.


      Any ideas how to correctly colorcode this situation?