5 Replies Latest reply: Mar 3, 2014 3:01 AM by Manish Kachhia RSS

    Nested Aggregation in Scripting

    Sindhu Neelisetty

      Hi Friends,

       

      I'm new to Qlikview and trying to work on one scenario where I'm stuck and tried to resolve that by Nested aggregation but QV is throwing me an error saying it is not allowed and please help me how to achieve it, here is the sample script of my scenario

       

      Temp:

      LOAD

          [id1], 

          [id2],

          avg([hol]) AS [Holidays],

        Resident [main_table]

          GROUP BY [id1],[id2];

         

      LEFT JOIN([Temp])

      LOAD

          [id1], 

        //  [id2],

          sum([Holidays]) AS [Holidays],

          Resident [Temp]

           GROUP BY [id1];

       

      My requirement is to achieve the aggregated value of same user having worked in different areas. When I used the above code QV returning the huge values. Please find the table for your reference.

      Id1Id2Holidays
      101110
      101110
      101110
      10125
      10125
      Result of Holidays :15

       

      Thanks in advance.

       

      Regards,

      Sindhu.