3 Replies Latest reply: Aug 24, 2012 6:16 AM by Sander Janssen RSS

    Set Analysis Problem

    MCPL MCPL

      Hi all,

       

      I am having a spot of bother around a set analysis.

      I have a line chart and want to display values as at the same time in the previous year.  However, my issue surrounds the selected variable.  For example, the selected variable (Trimester) displays as follows:  2012-2 (denoting 2012 as the year and 2 as the semester). I really don't want to split up the variable into 2 user selections/fields (Year and Semester) and run set analysis against these as it will add a layer of possible user error.

       

      The code I am using is:

       

      =COUNT({<Trimester={"$(LEFT(Trimester, 4)-1) & '-' & RIGHT(Trimester, 1)"}>}DISTINCT(PERSON_ID))

       

       

      have also tried

       

      =COUNT({<Trimester={"$(LEFT(Trimester, 4)-1) + '-' + RIGHT(Trimester, 1)"}>}DISTINCT(PERSON_ID))

       

      and just plain

       

      =COUNT({<Trimester={"$(LEFT(Trimester, 4)-1)"}>}DISTINCT(PERSON_ID))

       

      Have tried variants of the above and have come up feeling rather empty and dejected.

       

      Any suggestions would be welcome.

       

      Thanks

       

      Sample file attached.