1 Reply Latest reply on Jun 9, 2017 7:31 AM by Zhouyi Zhang

    Finding the count of members in YoY comparison.

    Abhishek Singh

      Suppose I am having 2 yr data and in that data set member Id is one column.

      I want to find the following :
      1) Count of member who are in both yr and label them as "Stayers"

      2) Members who are in only 1st year and not in 2nd year and label them as "Leavers"

      3) Members who are in only 2nd year and not in 1st year and label them as "New"

       

      So,  Can someone help me out from this problem ?

        • 1. Re: Finding the count of members in YoY comparison.
          Zhouyi Zhang

          Hi, Abhishek

           

          Please try below code and see if it works. If there is error popup, could you please shared some sample data as it would be easier to write the calculation code.

           

          If {Fixed [Member ID] : countd(Year([your date field]))} >1 then "Stayers"

          elseif {Fixed [Member ID] : countd(if  Year([your date field]) = { FIXED :MIN(YEAR([your date field]))} then Year([your date field]) end ) }  = 1 then "Leavers"

          elseif {Fixed [Member ID] : countd(if  Year([your date field]) = { FIXED :MAX(YEAR([your date field]))} then Year([your date field]) end ) }  = 1 then "New"

          end

           

          ZZ