11 Replies Latest reply: May 23, 2016 8:44 AM by Ruben Marin RSS

    Group by (Aggr in script)

    Partha Kulkarni

      Hi Everyone,

       

      I am having member_id's who have done multiple transaction within a month. I want to know the count of distinct member_id's who have done transaction for each month.

      I have written script as

       

      Aggregate:

      LOAD Month,

               Count(DISTINCT Member_Id) as Member_Count,

               Sum(Sales) as Sum_Sales

      FROM

      [..\Aggr_Temp.qvd]

      (qvd)

      Group by

                Month;

       

      Sales as is summed up, i am getting proper value but member_id count is going wrong.

      Kindly suggest.

       

      Attaching a sample file.