Most recent referenced value

KRejko
New Member

Hello,

I am trying to get the most recent value referenced from my current record. Currently, I am using the formula:

ANY(
     TOP(
          SELECT(
               [Related Invoices][Status], 
               [Due Date]=MAX([Related Invoices][Due Date]), 
          ),
          1
     )
) 

I have used a nearly identical formula elsewhere in the same app and this approach has worked successfully. However, in this case, the formula returns an empty value for the [Related Invoices][Status].

To try and debug this I have pulled out the โ€˜MAXโ€™ part of the formula into its own virtual column and can validate that this is picking up the most recent value.
2X_6_6d0794225951b7be3decf608fc0ba57394b4c485.png

Also, this value returned from the max function does match the most recent invoice date in the invoice table directly above:
โ€”image redacted due to new user limitationsโ€”

Thinking maybe this was a formatting error, I have also tried wrapping these dates in a DATE() function, but this did not solve the issue.

  DATE([Due Date])=DATE(MAX([Related Invoices][Due Date]))

I have also seen others use the MAXROW() function to achieve a similar outcome. However, I am not sure that this works in my case due to needing records related to the current invoice.

Any help or suggestions on how to fix or debug this issue would be greatly appreciated. Thanks in advance!

0 10 373
10 REPLIES 10
Top Labels in this Space