Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dawgfather
Creator
Creator

Earliest date across fields

I have several fields that might be populated with a variety of dates and I need to determine the earliest of them all.

I might have a Lease End date, a maintenance end date, or and end of life date.

Excel does that with something like =MIN(LeaseEndDate, MaintEndDate, EOLDate)

How can I do this in QlikView?

Some sample data would look like the below:

   

ModelLeaseEndDateMaintEndDateEOLDateEarliest
DMX46/29/2013-9/30/20176/29/2013
NS4806/30/2015-12/31/20166/30/2015
NS406/30/2015-7/31/20147/31/2014
USPVMOWNED1/31/20169/30/20161/31/2016
FAS2050AOWNED-6/30/20166/30/2016
FAS2050AOWNED-6/30/20166/30/2016
1 Solution

Accepted Solutions
santiago_respane
Specialist
Specialist

Hi Scott,

according to your sample data in the "Earliest" column you have the earlier date of all columns, so doing a min('Earliest') will give you the value that you want.

But if you have another date fields in other tables you can  do as follows:

=RangeMin(Min(LeaseEndDate),Min(MaintEndDate),Min(EOLDate),Min(Earliest),Min(AnotherDateField),.....)


Please let me know if this helps.

Kind regards,

View solution in original post

3 Replies
trdandamudi
Master II
Master II

May be like attached:

santiago_respane
Specialist
Specialist

Hi Scott,

according to your sample data in the "Earliest" column you have the earlier date of all columns, so doing a min('Earliest') will give you the value that you want.

But if you have another date fields in other tables you can  do as follows:

=RangeMin(Min(LeaseEndDate),Min(MaintEndDate),Min(EOLDate),Min(Earliest),Min(AnotherDateField),.....)


Please let me know if this helps.

Kind regards,

dawgfather
Creator
Creator
Author

Apologies...that "Earliest Date" was what I expect to see as a result of the expression.

Your RangeMin expression seems to give me that.

Thank you!