11 Replies Latest reply: Jun 27, 2011 4:24 AM by Bruno Martins Lêdo RSS

    Comparasion in Set Analysis with variables

      Hello,

       

      I have a issue with one of my KPI:

       

      I need do a sum of one of my column, it's a number of persons.

       

      But I want do this count with dimension category and a dimension Adult/Children.

      My problem is that dimension Adult CHildren is not fixed. I need calcul with the birthday and a date selectioned by the user in a calendar, the age of each personne and count the person in the field Adult or Childre.

       

      For this, I have create in a multidimensional chart, with one dimension : Category and two expressions :

      One for count the numbers of persons in Adult and the other for Children.

       

      I have create three variables :

       

      LET vSetAge     =  num((Date(Min(CALENDRIER_Choix.Date_Choix),'DD/MM/YYYY')-date([RECEVEUR.Date de Naissance],'DD/MM/YYYY'))/365)
      LET vSetAdulte =  IF(num((Date(Min(CALENDRIER_Choix.Date_Choix),'DD/MM/YYYY')-date([RECEVEUR.Date de Naissance],'DD/MM/YYYY'))/365)>=18,1,0)=1
      LET vSetEnfant = IF(num((Date(Min(CALENDRIER_Choix.Date_Choix),'DD/MM/YYYY')-date([RECEVEUR.Date de Naissance],'DD/MM/YYYY'))/365)<18,1,0)=1
      

       

       

      And my expression is :

       

      Sum({<$(vSetAdulte)>}[Nb Mise en attente])
      

       

      When I put the variable vSetAdulte like an expression I have 1 or 0 in the column but in the set analysis it's not works....I don't have nothing in my column. Can you help me please? I have past one day with many forms but I don't understand why it's not works.

       

      Kind Regards,

      Bruno