Re: Shifting the Fill color based on the negating factor
Hi @sabrinaaa_ ,
I am not sure if the logic is correct here due to your first condition which contradicts the next two, however you might have a look at this structure as it will save a lot of code and is easier to follow
With(
{
_Colour:
LookUp(
'INVITE Project',
ID = ThisItem.ID
).'Traffic Light',
_Start:
DateDiff(
Today(),
ThisItem.BaselineStart,
TimeUnit.Days
),
_End:
DateDiff(
Today(),
ThisItem.BaselineEnd,
TimeUnit.Days
)
},
If(
_Colour = "Green",
Colour.Green,
(_Colour = "Green" && _Start > 30) || (_Colour = "Green" && _End > 30),
Color.Red,
(_Colour = "Red" && _Start > 0 && _Start <= 30 || (_Colour = "Yellow” && _End > 0 && _End <= 30),
Color.Yellow,
Color.Green
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps