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):
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
This should probably be "ID" instead of "_ROWNUMBER" because MAXROW returns a key value. I'm assuming your "ID" column is the key column.
But are you wanting to look up the most recent row of the same color? You might need a 3rd argument in the MAXROW() expression if that is the case.
Yes, I need to subtract always from the last row. The order, which one is subtractied first or last, is not important. Important is that, in the example given above, I start with 5,0 grams and end up with 4.0 g.
User | Count |
---|---|
36 | |
8 | |
3 | |
2 | |
2 |