Hi,
Iโm trying to find the last value which is a price in another table, but only if that value is equal to the ingredient Iโm looking for. The formula is as follows:
MAXROW(โDETALLE CASHFLOWโ, โMARCA TEMPORALโ, ([_THISROW].[INGREDIENTE] = [PRODUCTO EQUIVALENTE]))
The problem is that Appsheet says the following: The expression is valid but its result type โRefโ is not one of the expected types: Price.
What can I do?
Thanks!
Youโll need to use the MAXROW() result with the LOOKUP() function to get the desired column value:
LOOKUP(
MAXROW(โDETALLE CASHFLOWโ, โMARCA TEMPORALโ, ([_THISROW].[INGREDIENTE] = [PRODUCTO EQUIVALENTE])),
"DETALLE CASHFLOW",
"row-key",
"wanted-column"
)
replacing row-key
with the name of the key column of the DETALLE CASHFLOW table, and wanted-column
with the name of the column from that same table from which you want the value.
Thanks Steve! The only issue now is that the app crashes with this formula. When I try to open the form, the app freezes. The formula is in a virtual column, donโt know if it has to do anything with the problem.
Nopโฆ It still crashes even though the formula is now in a real column. What to do? Thanks.
Crashes?! Yikes! For that, youโre better off engaging support@appsheet.com directly.
Hi Steve,
Support was very kind, but was not able to give a solution. Your formula is right and it is the best formula for this purpose. Still, with a database of only 1.250 rows, the app crashes. The solution they gave me was to slice the base.
Thanks for your help, just wanted to let you know what support told me.
User | Count |
---|---|
42 | |
29 | |
25 | |
23 | |
13 |