Key Performance Indicator (KPI) visual card not showing the negative number

Dear Support,

I am creating a KPI visual card. However, according to the attached picture, the number should be negative, but it is not the case.

Could anyone enlighten me on what I’m doing wrong?

calculated field script

ifelse(
{yhat_IsInLast12Months_param} = 1,
sumOver(ifelse({yhat_IsInLast12Months_param} = 1, yhat, 0), [{yhat_IsInLast12Months_param}], PRE_AGG),
ifelse(
{yhat_IsInLast24Months_param} = 1,
sumOver(ifelse({yhat_IsInLast24Months_param} = 1, yhat, 0), [{yhat_IsInLast24Months_param}], PRE_AGG),
0
)
)

Best,

Hi @piramidsurin,
What if you switch your fields around for value & target value, that should reverse the percentage change.
Let me know if that provides the outcome you’re looking to achieve

The problem has been fixed

I did change trend group from yhat_SumOver12 to yhat_IsInLast12Months_param (which contains only 0 and 1-- 0 for the rolling of 13rd-24th month, 1 for the rolling of 1st-12nd )

When I sorted by yhat_IsInLast12Months_param and ordered by DESC, it compared 0 to 1.

Best,

1 Like