Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

simple if statement question from a beginner

I would like to display values in a single column of a straight table in two different colors. The column is "Margin %" and I would like to display it in red if it is under 20% and green if it is over 20%.

Unfortunately, I can't even get a simple if statement to work. It may be my syntax, as I've never done it before. Under the definition for "Text Color" in my Margin % expression, I have

IF(Sum(Margin) / Sum(Sales) <= 0.2) // that margin / sales is how i calculated the margin percent...

red();

ELSE

green();

end if



I can't even get a simple if statement to work. But that's what I need to do.

Thanks!

1 Solution

Accepted Solutions
Not applicable
Author

Why have ELSE and end if

IF((Sum(Margin) / Sum(Sales)) <= 0.2,red(),green())

View solution in original post

1 Reply
Not applicable
Author

Why have ELSE and end if

IF((Sum(Margin) / Sum(Sales)) <= 0.2,red(),green())