The VLOOKUP function behaviourโฆ
HI! I am detecting an extrange behaviour with the VLOOKUP function. To place some context, I am applying a format rule to alert the user that a certain value (weight) he introduced in a form is higher or smaller than expected. To do this, the system looks for the product id (an ugly concatenation of product,units and length) in a reference table to compare the value with a max and min value.
Well, the question is that when you use this alert system in google spreadsheets, there is no problem. If the product id is not found in the reference table, it just gives โN/Aโ. But inside appsheet, I see that VLOOK funtion aparently gives a numeric value equal to โ0โ. So the โalertโ is always displayed if the product id is new, for example for a particular package with less units than usual.
Well, the question is easily solved with a and([value]<>โ0โ;โtheVLOOKformulaโ), butโฆ Am I right? is that the normal VLOOK behaviour?
Thatโs not a normal behavior, it should give you a blank value if the record is not found. May I ask what kind of LOOKUP() are you using?
AppSheet doesnโt have a VLOOKUP() function.
I am sorry, VLOOKUP is a mistake, I meant lookup.
The function was:
[Peso]>LOOKUP([Resumen];REF2;Grupo;maximo)
โPesoโ (weight) is the input value. โresumenโ is the product id. โRef2โ, the reference table, โGrupoโ is the product id in the reference table, and โmaximoโ is the max admissible value for โpesoโ. If The Lookup function is unable to find the โresumenโ value in the column โgrupoโ (for example, it happens when we have a new product), instead of not throwing any result for the exression, it returns the value โTRUEโ. Thats why I supposed that the lookup expression gives โ0โ. โPesoโ is always bigger than zero.
In fact, I placed the expression:
and([Peso]>LOOKUP([Resumen];REF2;Grupo;maximo);LOOKUP([Resumen];REF2;Grupo;maximo)<>0)
This way, I โforceโ a โfalseโ value if the lookup expression gives a โ0โ, and then the function works as I expect it to.
See Troubleshooting here:
I have two tables. One for a quote and one for the data. For the quote, I want to look up a specific value in the data table. I have an enum field to choose between 2 options. If the first option is selected then the dependent field will automatically change to the column in the data field. However, if the second option is highlighted, then I want to use that same value but divide it by 2. I tried using an IFS() and data[column] expression but that didnโt work.
Let me see if I understand you. You have a table โquoteโ (with a column you want to lookup, called [product], for example, and an [enum] column with"option1" and โoption2โ), and a โreferenceโ table (with column [data] and column [value]).
Well to do what you ask for (select a product, lookup for its โvalueโ, and if I choose the โoption1โ I get the โvalueโ, but if I choose โOption2โ, I got the same value but halved) I think I would use, in a column โresultโ:
=ifs([enum]=โoption1โ;lookup([product],reference;data;value;[enum]=โoption2โ;(0.5lookup([product],reference;data;value)))
(note that you cannot type "0.5value" inside the lookup expresion).
Thank you! I did something similar and it worked!
User | Count |
---|---|
14 | |
11 | |
9 | |
7 | |
4 |