0
    
          
  
  
    
            Calculate the percentage if this result is negative
There is a field, "RESULT", where the result of the past day is shown. I need to calculate the percentage if this result is negative
9 replies
- 
  
Try the sign() command.
if sign(RESULTS) = -1 then [code] end
 - 
  
This formula will return 1 if x is negative, and 0 if x is positive. You can then multiply it by your discount to return the discount or zero
abs((sign(x)-1)/2)Regards John
 
Content aside
- 1 yr agoLast active
 - 9Replies
 - 72Views
 - 
    3
    Following
    
 
