Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

How can I get a data from the last row?

Hi community

I have two tables, parent and child, for a paint color matiching process. In the first table I add rows with positive numbers as I add paint to a mixing cup. When it is time to do a test, I take a sample out of the mix cup and smear it onto a card for that purpose. So I need to substract equally from all of the colors mixed do far. For this purpose I have a field called "Inputt" in the parent table ("Igualado"), which acts in a series of grouped actions upon all of the colors previously added in the second table (Detalles_igual).

In this pic, first part, is what the app is doing currently (adding colors) and what I need it to do (subtracting colors):

CorneliusH_0-1718559113782.png

As you see, I have 3 numbers: "acum ant", (old total), "acum nvo", (new total, the active column where the adding up number is introduced)  and "Cantidad", the amount actually added. To do the subtracting, I have this formula, but something is wrong in the first line; it is not bringing me the last "old total" (I want to diminish the color "A" in this example):

LOOKUP(MAXROW(DETALLES_IGUAL,_ROWNUMBER),DETALLES_IGUAL,_ROWNUMBER,ACUM ANT)
-
SUM(SELECT(DETALLES_iGUAL[CANTIDAD],AND([ID_PROY]=[_THISROW],[COLOR]="A")))
*
(1-([INPUTT]/MAX(SELECT(DETALLES_IGUAL[ACUM NVO],[ID_PROY]=[_THISROW]))))

What am I doing wrong?

Cornelius

0 2 513
2 REPLIES 2
Top Labels in this Space