How to create calculation outcome that depends on selection, with entered value?

Basicly what i need is
IF [SU PVM] IS SELECTED THEN VALUE DOES NOT CHANGE (FOR OUTCOME)
IF [BE PVM IS SELECTED THEN VALUE THATS ENTERED USES FORMULA
=(BE PVM*0.21)+BE PVM

So basically if i enter price with no tax for the outcome i want to see price with tax and price with no tax, also other way around if i enter price with tax i want to see outcome for price with no tax and price with tax.

I hope i make sense, iโ€™m very new to this

0 12 143
12 REPLIES 12

Steve
Platinum 4
Platinum 4

I did learn something but, i still dont know how to put it in expression, can anyone help me out?
I come up with
If i select virtual column be pvm then [price] is bepvm+21%, if i select su pvm the value stays the same

Hi @Benas_Jasiulis

In the โ€œPrice with taxโ€ column, app expression (virtual column !):

IF([PVM Select]="Su PVM",
  [Price]*[Amount],
  [Price]*[Amount]*1.21
)

Edit: for reference:

Ok i have to simplify a bit because it doesnt work, So i just kept price with PVM as end result.

So i have emulist of two selectables [WITH PVM] and without [NO PVM], and i have [PRICE] where i can enter value, and i have final result column [Price PVM] by my limited understading
[Price PVM]= IF [WITH PVM] IS SELECTED, THEN VALUE ETERED IN [PRICE] STAYS THE SAME, IF [NO PVM] IS SELECTED [Price PVM]= THEN [PRICE]*1.21.

this is my first day using appsheets i just need to crack this so i can start to understand what going on

Hi @Benas_Jasiulis

This sounds like the expression given above.
What did you try so far ? Please share screenshot of what you tried.
Also, [Price PVM] should be a virtual colum.

Based on given informations, here is an adjustment:

IF([YourColumnSelection]="WITH PVM",
  [Price],
  [Price]*1.21
)

So i tried this formula before and i didnt work i dont know wgy thought. I have column [Price Type] which contains enulist, and i created virtual column to add this expression called [price pvm], maybe i added expresion to the wrong column?

Important detail is:

==> Which is different from Enum.

Can you change it to Enum ?

sorry i just misspelled it. So i have column called [Price Type] witch has Enumlist of two choises [PVM] and [NO PVM] and i have Column called [PRICE] . If i selecet [PVM] and enter price lets say 10$ so in spreadsheet value should stay the same, but if i select [NO PVM] [PRICE]= [PRICE](as in entered value )*1.21

i think im missing something here, its same as if i enter value it calculates with tax or whithout, as simple as it is i just cant figure it out

IF([Price Type]=โ€œNO PVMโ€,
[Price],
[Price]*1.21
)

Price Type should be of type Enum, not EnumList.

it did work! Steve thank you so much for you time, now im gonna read about enum and enumlist, im very very impresses about community support and app itself last time i programed when i was 13 now im 30 still kicking thought :DDDD

Aurelien
Google Developer Expert
Google Developer Expert

@Benas_Jasiulis

For better understanding:

  • EnumList allow you to pick various items among various choices.
    In this case, this does not make sense, unless you are a strong support of Schrรถdingerโ€™s quantics theory
  • Enum displays a list, among which you have the capability to pick only one item. Which is exactly waht you are trying to do.

And, the IF condition applies when you can have only an equality with one item (in your case !)

Top Labels in this Space