2 Replies Latest reply: Mar 12, 2018 5:34 PM by Shilpan Patel RSS

    Aggr() function

    Wanyun Yang

      Hi guys,

       

      Please help me on this function:

      I have a table as shown:

      Date  group  plan_checked  visit_checked

      Mon.    1                  0                      0

      Mon.    1                  0                      0

      Mon.    2                  1                      1

      Tue.     3                  0                      0

      Tue.     4                  0                      0

      Wed.    5                  1                      1

       

      I want to count the number of distinct Date&Group with plan_checked=0 and visit_checked=0. The result should be like:

      Mon.    1   

      Tue.     2

      Wed.    0

       

      My function is:

      SUM(IF(Aggr(SUM(ItemChecked)+SUM(MSChecked)+SUM(TPChecked),[Date]&Customer)=0,1,0))

       

      It doesn't work.

       

      Thanks for help!