Latest date from a reference

Hi everyone!

I need to look for the latest withdrawal of a product, that was given to a employee in table “Salidas” ( Date type). Then i need to add to that date the lifespan of that product, the information of that product is in another table “Productos” and the lifespan is the column [DURA] Number type but the result should be a Date type.
This should happen in a virtual column on table “Empleados”

Table “Salidas”


Table Employee
Table “Empleados”

Table “Productos”

I used this messy formula on “Empleados” table in “Guantes” virtual column, it worked at first but then the dates became random.

(
EOMONTH((
LOOKUP(
MAXROW(
“Salidas”,“Fecha4”,and([OPERADORID]=[_THISROW].[OPERADORID],[ITEMID]=“Itemd00ff4e3”)),“Salidas”,ID,“Fecha4”)), (ANY(SELECT(Productos[DURA], ([ITEMID] = “Item-d00ff4e3”))) - 1))
+
DAY((
LOOKUP(
MAXROW(
“Salidas”,“Fecha4”,and([OPERADORID]=[_THISROW].[OPERADORID]
[ITEMID]=“Itemd00ff4e3”)),“Salidas”,ID,“Fecha4”))))

I would like to read your recommendations

0 1 138
1 REPLY 1

Did you ever get a solution to this?

Top Labels in this Space