0 Replies Latest reply: Dec 12, 2016 11:47 AM by Chris Waterworth RSS

    Wildcard in a if statement

    Chris Waterworth

      Hi Qlik,

       

      A table showing which days a site has deliveries of which looks at little like this:

       

      SiteDelivery days
      A1,2
      B2,3
      C4
      D1,3,5

       

       

      I want to build a table that says whether or not a site has deliveries on a day. I want the table to look like the below (with a filter on for Site A).

       

      I am using the equation:

      if(weekday(BlankDate)=

      (if(wildmatch([Preferred Scheduled day],'*1*'),'Mon',

      if(wildmatch([Preferred Scheduled day],'*2*'),'Tue',

      if(wildmatch([Preferred Scheduled day],'*3*'),'Wed',

      if(wildmatch([Preferred Scheduled day],'*4*'),'Thu',

      if(wildmatch([Preferred Scheduled day],'*5*'),'Fri')))))),'y','n')

       

      However this only returns the 01/01/1991 as 'y' the next day is a no.

       

      Can anyone please help or come up with a better solution?

       

      DateDayDelivery
      01/01/1991monY
      02/01/1991tueY
      03/01/1991wedn
      04/01/1991thun
      05/01/1991frin
      06/01/1991satn
      07/01/1991sun

      n