Helps please! (division formula // IF)

Topic Labels: Formulas
772 2
Showing results for 
Search instead for 
Did you mean: 
4 - Data Explorer
4 - Data Explorer

Hi everybody how are you?

I am trying to create a formula that divides by 2 the amount of the field “Quantitat” only if in the “Tipus” field it says “sacas” and places it in the field “Tones”. Is it possible? I am using the following formula: “IF (Tipus =” sacas “,” Quantitat "/ 2) is it correct?

Thank you very much for the responses, greetings.
Captura de pantalla 2021-12-29 a las 17.36.58

2 Replies 2

Hi @Arnau_Forescat ,

You’re very close – just need to remove the quotes around your reference to the Quantitat field. Also, your condition checking for the value “sacas” will be case-sensitive, so “sacas” does not equal “Sacas”, as you have it typed in your Tipus field options.

IF(Tipus = "Sacas", Quantitat / 2)

You may want to round the results so you don’t have a large string of decimal digits…

IF(Tipus = "Sacas", ROUND(Quantitat / 2, 2))

It works!! Thank you very much Jeremy. I wish you a very nice year for you! :kissing_heart: