This content has been marked as final. Show 4 replies
I am trying to pick most recent date from Order table by Date and Product, but I have run into a problem when an item appears on multiple lines.
Here's an example when my script fails:
date(FirstSortedValue(InvoiceDate,-if(InvoiceDate >= monthstart(AddMonths(today(),-6)), InvoiceDate)))
How do I tell it to pick the most recent or just one from each date.