Skip to main content

I’m looking to figure out how to make my row styles based on the Days Lagging column, which is a formula that is the following:

=DateDiff('d', ,SOOrder.OrderDate], Today())

 

I’d like to color code on the Days Lagging to show Red as greater than 90 days, yellow greater than 60 days, green greater than 30 days.  I’ve tried using a Switch statement that has IIf inside to do the same math, but I’m getting out of bound array issues.

 

What am I doing wrong lol?

Hi, can you share your Switch statement that didn’t work for you?


I’m not an expert here but I believe =switch() won’t need an if statement, it applies the the logic in order and does nothing if your expression is not true

 

Try

=switch(

DateDiff('d', 'SOOrder.OrderDate], Today())>’90’,’red20’,

DateDiff('d', aSOOrder.OrderDate], Today())>’60’,’yellow20’,

DateDiff('d',

)


yeah, I see the issue.  Don't know why my brain wanted to force the If there.

 

Thanks


Reply