Help

Re: If() stock calcul

Solved
Jump to Solution
726 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Melissa1
6 - Interface Innovator
6 - Interface Innovator

Hello,
I would like to set up a calculation to allow me to multiply a number according to conditions. IF(), but I don’t know how to go about it.

Here is the request:
My column: ( hide) Inventaire Composant sortant (Unique) corresponds to a set of products: ex: 1 table. "I could have called this ( hide) Inventaire Produit fini sortant (Unique) → This is what I take out of my stock but as a product as a whole (single).
The question is for my column: Inventaire composant sortant ( Calcul pied), I would like according to conditions to be able to say if table with 2 feet, multiplies (( hide) Inventaire Composant sortant (Unique)) x 2 (# (hide)Pieds), if table with 3 feet, multiplies (( hide) Inventaire Composant sortant (Unique)) x 3 (# (hide)Pieds), if 4-foot table, multiplies (( hide) Inventaire Composant sortant (Unique)) x 4 (# (hide)Pieds), idem for if 1 feet and if Blank(), leave the field empty

This would then allow me to subtract Inventaire composant sortant ( Calcul pied) from ( hide) Inventaire Composant sortant (Unique) and have the result of my “Composants en Stocks”

Can someone help me, thank you very much :heart_eyes:

image

1 Solution

Accepted Solutions
Melissa1
6 - Interface Innovator
6 - Interface Innovator

Thank you very much, you solved my problem :star_struck:

See Solution in Thread

6 Replies 6

Hi Melissa! While I don’t completely understand what you’re trying to achieve (where is the amount of feet coming from?), usually using SWITCH() is much easier than a nested if statement. Hope that helps and otherwise just post here again :slightly_smiling_face:

Hi Rupert,
I forgot to add these printscreen “ #(hide) Pieds”

I reformulated my question and changed the printscreen

Hope you can help me
Thank you
image

Hi @Melissa1 ,
As @Rupert_Hoffschmidt stated, the Switch() can also be used. I think I got your field names correct.

IF({(hide) Pieds} = 2, {( hide) Inventaire Composant sortant (Unique)}*2, IF({(hide) Pieds} = 3, {( hide) Inventaire Composant sortant (Unique)}*3, IF({(hide) Pieds}=4, {( hide) Inventaire Composant sortant (Unique)}*4, '')))

Just to show you how this would look with SWITCH():

SWITCH({(hide) Pieds}, 
2, {( hide) Inventaire Composant sortant (Unique)}*2, 
3, {( hide) Inventaire Composant sortant (Unique)}*3, 
4, {( hide) Inventaire Composant sortant (Unique)}*4
)

But since you’re multiplying by the number of legs, it doesn’t make much sense. You could have a much easier IF statement (if I’ve understood things correctly):

IF({(hide) Pieds} != 0, {(hide) Pieds}*{( hide) Inventaire Composant sortant (Unique)}, "")
Melissa1
6 - Interface Innovator
6 - Interface Innovator

Thank you very much, you solved my problem :star_struck:

Thank you for your help :slightly_smiling_face: