5 Replies Latest reply: Apr 5, 2016 2:59 AM by Javier Faces RSS

    Set Analysis - IF on a non aggregation function

    Javier Faces

      Hello experts


      First of all, I am kind of new in Qlik Sense, so apologies in advance if this is something pretty obvious.


      I am creating an app to analyse invoice data. There are two different date fields in the data model, one of them has many NULL values (Date1) and the other hasn't (Date2).


      What I am trying to do is to create a unique field date which takes the value from Date2 field in case it is not NULL, otherwise it should take the date from Date1, which has value in every record.


      I am trying to do it directly in the table graph by setting this function as a measure:


      IF([Date1]=' ', [Date2],[Date1])


      But the result is not as nice as I expected, because it is working just fine for records where Date2 is not NULL, as it gets the Date2 value in those cases. But in the rest of records is not displaying any value at all, so basically what is doing this function is copying Date2 column.


      I am trying to fix the function, but all the IF function examples in set analysis that I have been able to find by searching in google so far, are aggregation function related. Therefore I am kind of clueless.


      Thanks in advance and regards