Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table where I want to color code the cells with the value of 0 in it (and only the cells that equal 0).
In the Background Color Expression of a table, I have the following expression: “If(([Suspense Date]-[Assigned Date] = 0), red())”.
No cells are colored – which is not what I expected.
However if I change the expression to “If(([Suspense Date]-[Assigned Date] > 0), red())” I get all the cells colored red with a value greater than 0 (as expected).
I must not be checking for equality correctly because if I try “If(([Suspense Date]-[Assigned Date] = 6), red())” it still doesn’t work.
Hi
Try like below
If(Floor([Suspense Date])-Floor([Assigned Date]) = 0, red())
Hi
Try like below
If(Floor([Suspense Date])-Floor([Assigned Date]) = 0, red())
your background color expression should be relevant to the expression used in Data tab.
let us know more details about your graph. (Dimensions & expressions Used)
Mayil,
Thanks so much! Adding Floor worked. Can you help me understand why it worked? Why do I use Floor here but not when it's a greater than or less than? (I'm a total newbie and trying to learn).
Thanks again!
Meg
HI
Might be, ur date field has timestamp.
so its always has some decimal values if you subtract two timestamp values.
Yes! I am subtracting two date fields in the format of: "7/27/2021 10:34:00 AM"
So you have to use Floor with timestamped values?
Hi
Floor function helps to ignore the time values & compare the date alone.
Hope it helps
Mayil,
Yes, very helpful! Thanks so much.
Meg