Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Last sales date before certain date

Dear community,


I got many difficulties with the set analysis, is there anyone can help me with following scenario?


I am trying to find out the most recent sales date before the date whichever user is selected,


The script I have created, but it doesn't work...


vMinDate = min(Date)


if(SDate <= vMinDate, max(month(FS_SDate)))

1 Reply
morganaaron
Specialist
Specialist

You should be able to use:

=FirstSortedValue({<Date={"<$(=Date(Min(Date)))"}>} Sales, -Date)

Replacing Sales for whatever field holds your sales values - this will give you the latest sale with a date less than the selected date, bear in mind that without a selection this Date field will find the minimum date possible, and so would return a null value as there's no date less than the minimum of your dataset - you could make your set more complex to allow for this if need be.