4 Replies Latest reply: Aug 30, 2017 11:00 AM by Sunny Talwar RSS

    Class Function using Aggr

    shweta gupta

      Hi,

      I am using following expression in the dimension

       

      =IF((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))=0,'0',
           IF((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))<50 and(Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))>0,
               Class((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo)),25,''),
                   IF((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))>50, Class((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo)),25,''))))


      Things looks fine if I plot this in table but When I am plotting above expression as dimension it is giving me the following ranges:

       

          0
           25<=<50                     ---------- Here 0-25 slab is missing on dimension. Please  explain
           50<=<75

       

      Can some one please help!

        • Re: Class Function using Aggr
          lakshmipathi p

          Hi,

           

          try this,

           

          =IF((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))=0,'0',

               IF((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))<=25 and(Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))>0,

                   Class((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo)),25,''),

                       IF((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))>50, Class((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo)),25,''))))

           

          Regards,

            • Re: Class Function using Aggr
              lakshmipathi p

              Or try this,

               

              =IF((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))=0,dual('0',1),

              IF((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))<=25 and(Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))>0,dual('0-25',2),

              IF((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))<=50 and(Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))>=26,dual('26-50',3),

              IF((Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))<=75 and(Aggr(Max(Date),SerialNo)- aggr(Min(Date),SerialNo))>=51,dual('51-75',4)))))

            • Re: Class Function using Aggr
              Vineeth Pujari

              What does this do?

               

              =AGGR( CLASS ( Max(Date)  - Min(Date),25) , SerialNo )

              • Re: Class Function using Aggr
                Sunny Talwar

                May be this

                 

                =Aggr(If((Max(Date) - Min(Date)) = 0, '0', Class((Max(Date) - Min(Date)), 25)), SerialNo)