7 Replies Latest reply: Mar 4, 2011 10:03 AM by Stephen Redmond RSS

    Set Analysis - Match 2 conditions

      Hi all,

       

      I have a problem! [:(]

      I want to count the customers that have sales in two different season.

      My issue is to count the customers that have sales in current season and also in the previous season but with order date <= (today()-365), that is to say customers that have sales in the last year until today()-365).

      To explain better: today is 3rd March 2011. What I need is to count distinct customers that have sales in current season and also in previous season but with order date <= 3rd March 2010.

      I try this with set analysis (i have two variables, s1 and s2, to indicate respectively current season and previous season).

      I try this formula but it does not work:

       

      count({$<[Season]={$(s1)}>*<[Season]={$(s2)}, [Order Date]={"<$(=date(setdateyear(today(),year(today())-1),'YYYYMMDD'))"}>}distinct [Customer])

       

      Could someone help me?

       

      Thanks a lot!