2 Replies Latest reply: Dec 29, 2011 3:13 AM by Birgit Kühn RSS

    Aggregation in Script "Invalid Expression"

      Hi Qlikies,

      It's the first time I try to aggregate in script and it doesn't work. Helps appreceated

      This ist my (only) sourcetable.

      %AGGR2ANZPR.ZPRAES_AGGRJAHRKW.AGGRTC_KG.AGGR
      140183220113522011351407146
      140284820113522011351407146
      140152820113512011351407146
      140500620113542011351405006
      140658020113522011351405006
      140284820113522011351405006
      140731820113512011351405006

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      this is, how i try to aggregate

       

      ZPRAES_AGGR2:

      noconcatenate load

        JAHRKW.AGGR as JAHRKW.AGGR2,

        TC_KG.AGGR as TC_KG.AGGR2,

        sum(ANZPR.ZPRAES_AGGR) as ANZPR.ZPRAES_AGGR2

      resident ZPRAES_AGGR

      order by JAHRKW.AGGR,TC_KG.AGGR;

       

      to receive

      JAHRKW.AGGR2TC_KG.AGGR2ANZPR.ZPRAES_AGGR2
      20113514071465
      20113514050069


      But what I receive is "Invalid Expression". Without the row" sum(ANZPR.ZPRAES_AGGR) as ANZPR.ZPRAES_AGGR2" the script runs trough.

       

      thanks for your help

      Birgit