3 Replies Latest reply: Aug 13, 2018 11:50 AM by Anil Samineni RSS

    Adding Multiple Conditions Into an Expression Formula

    Kyle Hahn

      Hello,

       

      In need of help once again   I am trying to conditionally format one column (Start Date) in multiple ways. One way (which I have an accurate formula for already) is to mark any Charter dates that are 30 days before today's date with a red background and black text.

       

      Here is that formula:

      if(getfieldselections([PCI Type])='CHARTER',

      if([Plan Start Date]<Today()-30,red(200),black(50)))

       

      I'd like to add a second condition similar to this one, except highlighting dates that are between the current date (Today) and 60 days from now (+60) with a blue background and black text. Earlier, I was able to get an accurate way to COUNT the number of dates with this criteria with this formula:

      Count({ < [Plan Start Date] = {">$(=Today(1))<$(=Date(Today(1)+60))"}, [PCI Type] = {'CHARTER'}>} [PCI Type])

       

      Here is my attempt at combining the two:

      if(getfieldselections([PCI Type])='CHARTER',

      if([Plan Start Date]<Today()-30,red(200),black(50),

      if({ < [Plan Start Date] = {">$(=Today(1))<$(=Date(Today(1)+60))"}},blue(200),black(50))))

       

      What am I missing? Really appreciate any help!

       

      Kyle