Conditional Formatting applying wrong value

The conditional formatting for my KPI visual is not applying correctly:

As you can see, the comparison value should be formatted in red if the change is negative. For some reason the value is being formatted in green though…

I’m seeing this for 1 other KPI visual in my analysis as well.

Hi @georgeAWS4

Can you share your computations for the three numbers shown in the visual and the one referenced in the conditional formatting?

Regards,
Giri

Here’s the calculated field used in the KPI visual:

{4 week Rolling average % change}

ifelse(

isNull(lag({4 week Rolling average}, [{result_date} ASC], 1))

OR lag({4 week Rolling average}, \[{result_date} ASC\], 1) = 0,

NULL,

(

{4 week Rolling average}

- lag({4 week Rolling average}, \[{result_date} ASC\], 1)

)

/ lag({4 week Rolling average}, [{result_date} ASC], 1)

)

and this references {4 week Rolling average}:

windowAvg(

sum({Slaughter Count}),

[{result_date} ASC],

3,

0,



)

Hi @georgeAWS4,

Just checking back in since we haven’t heard from you in a bit. Are you still running into the same issue or did you find a solution yourself in the meantime? If you still have any additional questions related to your initial post, please feel free to share them. Otherwise, any update you’re able to provide within the next 3 business days would be helpful for the community.

Thank you!

I am still running into the same issue…

Still seeing the same issue - can anyone help explain this please?

Hi @georgeAWS4,

Apologies for the delay in response. Could you please send an Arena view link (can be mock data to protect sensitive info) of your analysis? I want to make sure that this is not a result of the calculated fields (even if they yield correct results) messing up something with the percent calculation, as I feel that could be why it is switching +/ - .

Thank you!

@WLS-Luis Conditional Formatting Error Dummy Arena

Hi @georgeAWS4,

After looking into your Arena view, it does not seem to be a percent calculation and just an issue with your conditional formatting setup. For both text color and icon of your conditional formatting, I would change the “Format field based on” section to “Difference”. On my end it swapped the coloring for +/- and seems to provide the correct logic for your visual.

Hope this helps!