12 Replies Latest reply: Jan 5, 2018 5:48 AM by Eric Vilarrasa RSS

    Load table Where Exist ($(Variable that may be empty))

    Eric Vilarrasa



      I am working in a Foor loop where i have to chech for duplicates and I want to do it with an Exist. Comparing the Field of the New Table with the one of the Old Table. The point is that sometimes for some tables i have to do it for 1 field but sometimes for more.


      My load is the Folowing



      Load *

      Resident MyResidenTable

      where not( Exist ( $(Field1NewTable), $(Field1OldTable) ) ) 

      and not( Exist ( $(Field2NewTable), $(Field2OldTable) ) ) ;

      The problem appears that when $(Field2NewTable) and $(Field2OldTableare empty I can not do the load.


      I Tryed Qlikview Loads the table if I do something like not( Exist ( 'RandomText', 'RandomText') ) . But if I use '$(Field1NewTable)'  it is text and when the Fields are not empty does not work Correctly.

      Also I tryed to do if( len($(Field2NewTable))>0, $(Field2NewTable), 'RandomText') but QlikView is Still Complaining.

      Is there some way to do that?