Most recent image (2)

Hello, for simplicity, I have a Bus number column, a bus image column and a date column. I would like to retrieve for each row in virtual column, the most recent image of the bus number of this row.
But obviously the max function only uses numeric values.
Here is my formula:

max(select(carrosserie[schema],and([bus]=[_thisrow].[bus],[date_avar]=max(carrosserie[date_avar]))))

The inputs for function โ€˜MAXโ€™ should be a list of numeric values

Solved Solved
0 5 302
1 ACCEPTED SOLUTION

You can use MAXROW like below - Iโ€™m not clear which column is your key column so Iโ€™ll just refer to it as โ€œKeyโ€ and you will want to replace with the actual column:

SELECT(carrosserie[schema], [Key] = MAXROW("carrosserie", "date_avar", [bus]=[_thisrow].[bus]))

View solution in original post

5 REPLIES 5

You can use MAXROW like below - Iโ€™m not clear which column is your key column so Iโ€™ll just refer to it as โ€œKeyโ€ and you will want to replace with the actual column:

SELECT(carrosserie[schema], [Key] = MAXROW("carrosserie", "date_avar", [bus]=[_thisrow].[bus]))

Thank you very much for the formula, it works great. You are great.

Hi @WillowMobileSys ,

Hi, I tried to follow your directions but it gives me error.

I would like to add "initial value" in a form entry. I would like that once the "item code" ("[Codice Articolo]") is written in the form, auto write the last supplier ("[Fornitore]") used to purchase the same item code ("[Codice Articolo]").
The formula used is as follows:

select(righe ordine[Fornitore];[Codice Articolo]=maxrow("righe ordine", "Date",[Codice Articolo]=[_THISROW].[Codice Articolo]))

It gives me this error: "The expression is valid but its result type 'List' is not one of the expected types: Ref"

I hope I have been clear.
How can I fix this?

Thank you very much!๐Ÿ‘๐Ÿผ

Top Labels in this Space