Virtual column discrepancy

Hi community,

I have been working on an inventory app (app 1)  that records quipment delivery for the employes, and it has a virtual column that displays when will be the next time that equipment will be changed. The thing is I had to transfer that functions to another app (app 2) that uses the same source table, but the virtual columns does't work in the second app.

G0ldsoul_0-1666642158556.png

This is how the virtual column "Guante anticorte" is supposed to work in app 1, shows the date were next cut proof gloves will be given in two months since the last delivery.

G0ldsoul_1-1666642404058.png

This is the same "Guante anticorte" in app 2 with the same formula.

This is the formula for  "Guante anticorte":

EOMONTH((
LOOKUP(
MAXROW(
“MOVIMIENTOS”,“FECHA”,and([OPERADOR]=[_THISROW].[ID],[TIPO]="GUANTE OPERADOR")),"MOVIMIENTOS",ID MOV,"FECHA")),(ANY(SELECT(TIPO[TIEMPO], ([ID TIPO]="GUANTE OPERADOR"))) - 1))
+
DAY(
LOOKUP(
MAXROW(
“MOVIMIENTOS”,“FECHA”,and([OPERADOR]=[_THISROW].[ID],[TIPO]="GUANTE OPERADOR")),"MOVIMIENTOS",ID MOV,"FECHA"))

The virtual column is in this table "Base de datos buena"

G0ldsoul_2-1666643006186.png

This is the table "Movimientos"

G0ldsoul_3-1666643147788.png

This is the table "Tipo" 

Column "Tiempo" includes the number of months the equipment lasts.

G0ldsoul_4-1666643189982.png

Hope someone may figure out what's going on,  thanks!

 

0 3 94
3 REPLIES 3

Since it is a second app and the expressions are identical, then it must be that there is something different about the data between the two apps.  Make sure that ALL tables used in the expression, are being sourced from the same datasource in both apps. 


@G0ldsoul wrote:

ANY(SELECT(TIPO[TIEMPO], ([ID TIPO]="GUANTE OPERADOR"))) - 1


Hola solo por curiosidad, esta parte de tu formula no le veo el sentido, dado que aparentemente siempre tendrá el mismo valor.

Ahora,volviendo a tu consulta, una forma de saber a que se debe algun error o dato no esperado, cambia la columna virtual al tipo texto para saber que te bota. Porque a simple vista esa formula EOMONTH opbtiene una fecha vacia (ya lo comprobe en mi app). Y eso genera el 2001 como año.

Me late que es como indica @WillowMobileSys hay un tema con tu data.

Otro mogtivo que se me ocurre pareciera que la fecha que obtiene en el Lookup de tu formula EOMONTH es vacio, osea esta condicion no jala nada: and([OPERADOR]=[_THISROW].[ID],[TIPO]="GUANTE OPERADOR"

Prueba a ver si es esto. nos avisas.


@Luis_Rodriguez_ wrote:

Me late que es como indica @WillowMobileSys hay un tema con tu data.


I am leaning towards a data issue because the implication is that the expression works in App 1 but when copied to App 2 it produces the wrong result - even though App2 "uses the same source table". 

My thought is that maybe the main table is the same but there are references to other tables that could be different impacting the entire expression result.

 

 

Top Labels in this Space