Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi all,
Anyone could teach me how to write a script to have a conditional color (e.g. +ve figure shows red color; -ve figure shows black color).

Best Regards,
Alan
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be like this:
If(YourExpression > 0, LightRed(), Black())
and it needs to go here:
but you won't be able to include Target Variance (days) and 48 with different formatting in one text box objects. You can use two different text box objects and use the above for the object with the expression.
 HirisH_V7
		
			HirisH_V7
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi ,
May be like this,
Data:
LOAD * INLINE [
ID, Score
1, 48
2, -49
3, 50
4, -89
5, 98
];
Output:
In Expression Back Ground Color:
=if(Score>=0,Black(),LightRed())
There in place of '0' you Can use your cut off value -> 48.
PFA,
HTH,
Hirish
 
					
				
		
Thanks all,
I tried Sunny T's method (it is easier for me). Unfortunately, still unsuccessful.



Best Regards,
Alan
 HirisH_V7
		
			HirisH_V7
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Change your expression like this,
=IF(Num($(Close Debtor Provision Current)/1000,'#,##0')>=0,Black(),LightBlue())
Else Check your variable once.It is giving your desired number or not .
Hope this helps,
Regards,
Hirish
 
					
				
		
Thanks Hirish V,
But still unsuccesesful.


Best Regards,
Alan
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Or even this:
=If($(Close Debtor Provision Current) >= 0, Black(), Blue())
 HirisH_V7
		
			HirisH_V7
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi ,
Can your be able to share your app!!
-Hirish
 HirisH_V7
		
			HirisH_V7
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi ,
Did gone through your variable output . Check it once.
Hirish
 
					
				
		
same result, can't display the figure.
