4 Replies Latest reply: Oct 7, 2011 9:25 AM by stefano santini RSS

    Set analysis < max(YearMonth)

      Hi,

       

      Question about set analsis.

      I wonder if it's possible to select every sales record smaller then the max selected year and month but keep the possibility to make selections in the dimension (the dimension contains projectnumbers).

       

      For example, when I have the years 2010 and 2011 and months may and june selected it should sum all sales <= 201106 .

       

      Using:

       

      sum(

      {1<

      YearMonth={$(=max(YearMonth))}

      Sales)

       

      Will get the desired result but I will lose the flexibility to select any projects.

       

      Using an aggr isn't working either:

       

      sum(aggr(

      sum(

      {1<

      YearMonth={$(=max(YearMonth))}

      Sales)

      ,Project)

       

      It give strange results. Anyone know how to fix this problem? An example is attached.