Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
magellan
Contributor III
Contributor III

First date of a data set but of the current year

Hello,

I have a set of data which contains dates reaching from 01-03-2024 to 30-03-2024 and various dates in 2023.

Now I need to get the first date out of my data set but out if this year. This would be 01-03-2024.

When I use min(), minstring(), makedate() the result is either 01-01-2024 or the first date in the data which is some day in 2023.

Is it possible somehow to get the desired 01-03-2024?

Labels (4)
1 Solution

Accepted Solutions
magellan
Contributor III
Contributor III
Author

Thanks to everyone.
I solved this using the following expression:

=date(FirstSortedValue ({< [Date.autoCalendar.Year] = {$(=year(today()))}>} distinct [Date], [Date]))

View solution in original post

3 Replies
BrunPierre
Partner - Master
Partner - Master

@magellan I didn't fully grasp it initially, perhaps this.

=Min({<[Date Field]={"$(=Date(MonthStart(Max([Date Field] )), 'DD-MM-YYYY'))"}>} [Date Field])

steeefan
Luminary
Luminary

LOAD
  Min([Date Field]) AS MinDate
FROM
  DateTable
WHERE
  Year([Date Field]) = Year(Today());
magellan
Contributor III
Contributor III
Author

Thanks to everyone.
I solved this using the following expression:

=date(FirstSortedValue ({< [Date.autoCalendar.Year] = {$(=year(today()))}>} distinct [Date], [Date]))