3 Replies Latest reply: Sep 29, 2015 3:58 AM by Jonathan Dienst RSS

    Data Loader If Statement



      I am trying to load data from an access data table where I want to check two date fields (dteMultipleYearEndDate and Contract_End_To). If the dteMultipleYearEndDate isnull then I want to load the Contract_End_To date instead as EndDate


      I am trying to do this in the data loader as I want to then use a derive on the EndDate to give me date time fields in Qliksense Desktop.


      I have tried this code but receive a script error:


      if 'dteMultipleYearEndDate' isnull then Load [Contract Date to] as [EndDate] from `TblProviderInformation Query9`; else Load [dteMultipleYearsEndDate] as [EndDate] from `TblProviderInformation Query9`; endif


      I have also tried:


      if 'dteMultipleYearEndDate' isnull then Load [Contract Date to] as [EndDate] from `TblProviderInformation Query9` else Load [dteMultipleYearsEndDate] as [EndDate] from `TblProviderInformation Query9` endif


      I can not seem to find any information to indicate if an IF statement can even be used in the data loader. Qliksense provides expresison guidance on the if statement but I am not sure if that means it can be used in the data loader or is just standard guidance you would receive in a expression builder for functions / master items.


      Help would be greatly appreciated.