Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
Within the load script, I have a fixed list of KPIs for changes in customer counts: Breakdown by Last Day, Change compared to Previous Month, Change compared to Year End, Difference from Previous Month, Difference from Year End. Based on this list, I calculate customer counts and change rates for each segment. I present the results in a straight table. An example calculation looks like this:
if(kpi='1', num(sum({<tarih={"$(=Max(Tarih))"}, segment={'a'}>} musteri_adedi)
/ sum({<tarih={"$(=Max(Tarih))"}>} musteri_adedi)),'0.0%'), if(kpi='2',num(sum({<tarih={"$(=Max(Tarih))"}, segment={'a'}>} musteri_adedi) - sum({<period={'last month'}, segment={'a'}>} musteri_adedi)) / sum({<period={'last month'}, segment={'a'}>} musteri_adedi)),'0.0%)... It continues like this.
Here, I'd like to implement a text color scheme where if the result of each calculation is greater than 0, it's displayed in green, and if it's less than 0, it's displayed in red. How can we achieve this?
I appreciate the help as always...
Hi
try this
lets say your calculation column is the column 2 of your straight table then
if(column(2)<'0',LightRed(),LightGreen())
It appears green at negative values. Unfortunately, the red did not appear
hi may be like this
if(column(2)<0,LightRed(),LightGreen())
like this
In the expression, the use of quotation marks doesn't have any effect. I'm getting the same result in both cases.
I'm sorry, I used the column name incorrectly, but I fixed it. Your suggested solution gave me exactly what I was looking for. I'm grateful.