2 Replies Latest reply: Mar 5, 2018 10:27 AM by Joanna Seldon RSS

    colour by expression with date match qlik sense

    Joanna Seldon

      Hi

       

      I am using qlik sense

       

      I have a table that has

       

      ID, Date, DepartmentCode, Status

       

      Note: Date is max(Date)

       

      I wish to colour by expression the date column if anyone in the last 3 months places an order for an inactive department.

       

      I have tried this  

       

      if (Max(Date) = AddMonths(Max(Date), -0) and Status = 'Inactive', Red(),

      if (Max(Date) = AddMonths(Max(Date), -1) and Status = 'Inactive', Yellow(),

      if (Max(Date) = AddMonths(Max(Date), -2) and Status = 'Inactive', Green(), white())))

       

      with no joy

       

      please help