Hi @Christyan_Matos!
First, I’ve opened this topic a few times and seeing that a) @Vivid-Squid had answered and b) seen that your response contained a quote block, I erroneously thought the question remaining the same. I’m sure a few others have done the same for the same reason. It helps when people only use the quote function when the text within the quote block remains the exact same as the quoted text. If you supply new text or info, do that outside of a quote block.
IF formulas work like this
IF({Condition},
{condition is true},
{condition is false}
)
Outputs of an IF formula can be text, a field value or an action.
If text you write the text within quotation marks, e.g. 'desired output'
If field value you wrap the desired field name within curly brackets, e.g. {field name}
.
If action you simply type your desired formula, e.g. desired formula
You can nest IF statements, like in your case
IF({is X greater than the value of column Y},
[True] {Y},
[False] IF({is X equal to Y},
[True] {X},
[False] {X}
)
)
[True] and [False] are there for teaching purposes and should not be there in the actual formula.
Using this; in your case the formula then ends up being
IF(X>Y,
Y,
IF(X=Y,
X,
X
)
)
When you understand the basics you can simplify your formula. In case of comparing numbers Airtable allows us to use >=
Greater than or equal to and <=
Less than or equal to, like @Vivid-Squid did in his answer, which allows us to state your formula as
IF({is Y greater than or equal to X},
{X},
{Y}
)
And the done formula.
IF(Y>=X,
X,
Y
)
You can find all kinds of formula functions here in the formula field reference guide.
I hope that made sense and helped you.