8 Replies Latest reply: Mar 3, 2015 8:34 AM by Schneider Schneider RSS

    Using Group in the load script like aggr


      Hi there,

       

      i have a database of objects with certain reoccuring ID's which have fields attached to them.

       

      I want to load all the entries where Field1 = 'X' and the total number of field2 entries with the value ='D' is bigger than 5.

       

      I manged to get a list of IDs which match that criteria but i have troubles getting them into my Load Script since i cant use the aggr function there.

      In the LoadScript i used a if to flag all my matches

       

       

      Load

       

       

       

       

       

       

      * ,
      if (Field2= 'D',1,0) as DTYPE,

      from .......

      And then i reload it using:

       

       

      F15_select:

       

      Load *
      Resident F15_merged
      Where Field1 = 'X'

      and (here would probably come something like the expression below);

       

      In Qlik view i created a ListBox with the expression

       

       

      =

       

      if(aggr(sum(RTYPE), ID)>5,ID)

       

      Which creates a list of IDs that match my criteria.

       

      How can i translate that into the Load Script so only the List of IDs above is loaded?

       

      I figured i have to use group by, but i havent figured out how.

       

      Can somebody help me?

       

      Thanks

      Julian