2 Replies Latest reply: Aug 18, 2009 11:02 PM by Yalak Sun RSS

    set analysis for null value

      Hi, I have a question about Set Analysis.

      I want to calculate the number of first-time mom and non-first-time mom, the conditions are

      1. First time mom : First born flag = Y and only has one due date

      2. Non-first time mom : First born flag <> Y or has more than one due date

      For first time mom, I wrote

      =count({$Customer_First_Born_Flag ={Y}, Customer_Due_Date1={ }, Customer_Due_Date2= { }>} distinct Customer_Key), which didn't work.

      But =count({$Customer_First_Born_Flag ={Y}>} distinct Customer_Key) worked!!

      Why is that? Isn't { } represents null value? Please help please!!

       

        • set analysis for null value

          I tried to do this, this didn't work either:

          =



          count({$<Customer_First_Born_Flag = {Y}, Customer_Due_Date1 = {*}>

           

           

          -$<







           

           

          Customer_First_Born_Flag = {Y}, Customer_Due_Date1 = {*},Customer_Due_Date2 = {*}>

          -$<



          Customer_First_Born_Flag = {Y}, Customer_Due_Date1 = {*},Customer_Due_Date2 = {*}, Customer_Due_Date3= {*}>

          -$<



          Customer_First_Born_Flag = {Y}, Customer_Due_Date1 = {*},Customer_Due_Date2 = {*}, Customer_Due_Date3 = {*}, Customer_Due_Date4 = {*}>

          -$<



          Customer_First_Born_Flag = {Y}, Customer_Due_Date1 = {*},Customer_Due_Date2 = {*}, Customer_Due_Date3 = {*}, Customer_Due_Date4 = {*}, Customer_Due_Date5= {*}>

          -$<Customer_First_Born_Flag = {Y}, Customer_Due_Date1 = {*},Customer_Due_Date2 = {*}, Customer_Due_Date3 = {*}, Customer_Due_Date4 = {*}, Customer_Due_Date5 = {*}, Customer_Due_Date6= {*}>

          }



          distinct Customer_Key)

           



           

           





            • set analysis for null value
              Yalak Sun

              Hello,

              I'm just wondering do the due dates really matter because you're flagging the first time moms with "Y" already.

              First time moms:

               


              =count ( distinct { $<Customer_First_Born_Flag = {"Y"} >} Customer_Key)


              Non-First timers:

               


              =count ( distinct { $<Customer_First_Born_Flag -= {"Y"} >} Customer_Key)


              Do you need to count how many kids they have for the non first time moms? Then you will need to take the due dates into account.