5 Replies Latest reply: Aug 31, 2016 11:48 AM by Sunny Talwar RSS

    Sum if not working

    Inês Castelhano

      Dear all,

       

      I have the following expression:

      SUM(IF(Aggr($(variable1),field1, field2, country, field4)>=1 and

        Aggr($(variable1),field1, field2, country, field4)<6,1,0))

       

      and it is working fine, as one can see in the table below. However, if instead of 1,0 I use an expression, my expression doesn't work anymore.

       

      SUM(IF(Aggr($(variable1),field1, field2, country, field4)>=1 and

        Aggr($(variable1),field1, field2, country, field4)<6,Count (Distinct{(<field5 = {'Submitted'},

        field6={'Owner'}, field7 -= {'Event'}>)*<field8={$(variable2)}>}field1),0))

       

      Moreover, if I use the count distinct separately, it works.

      Could anybody help me with this?

       

      country.PNG

      Cheers,

      Inês