Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a dashboard with many tables of calculated variances. These are configured to display as red if negative, green if positive, but in the case of zero value, I am displaying values like "-0%" in red or "0%" in green when the desired behavior is to display "0%" in black.
The display color is calculated in the Text Color property of the expression, which basically consists of a copy/paste of the expression definition which is long and complicated due to the fact that we are reporting different metrics, different precisions, etc. on each row, but something like this:
if( calculation < 0, RGB(255,0,0), RGB(0,127,0))
There are two problems to solve: 1) "-0" and 2) the color black
What is the best way to handle this...using round(), num(), etc.?
May be like this
Color
If(Round(calculation) = 0, Black(),
If(calculation < 0, RGB(255,0,0), RGB(0,127,0)))
Value
If(Round(calculation) = 0, 0, calculation)