Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pick Earliest Date from Different Dates

Hi All,

I've a 5 date fields(Quoted, Issued, AI, Closed, Declined) and one application received date field. I've to pick up the earliest date from those 5 date fields for policy wise and calculate Distinct (EffDate & Product & Customer#) records .

I am Attaching the sample file having these date fields.

Anyone please help me its an urgent requirement in my project.

Thanks in advance.

Anusha

1 Solution

Accepted Solutions
sunny_talwar

May be use RangeMin() function:

RangeMin(Quoted, Issued, AI, Closed, Declined) as Earliest

RangeMin(If(Quoted > 0, Quoted), If(Issued > 0, Issued), If(AI > 0, AI), If(Closed > 0, Closed), If(Declined > 0, Declined)) as Earliest


View solution in original post

5 Replies
sunny_talwar

May be use RangeMin() function:

RangeMin(Quoted, Issued, AI, Closed, Declined) as Earliest

RangeMin(If(Quoted > 0, Quoted), If(Issued > 0, Issued), If(AI > 0, AI), If(Closed > 0, Closed), If(Declined > 0, Declined)) as Earliest


Kushal_Chawda

Can you try

Data:

LOAD *

WHERE len(EarliestDate)>0;

LOAD Product,

           Customer#,

           EffDate,

           rangemin(Quoted, Issued, AI, Closed, Declined) as EarliestDate

FROM Table

Anonymous
Not applicable
Author

Thank you Very much Sunny

sunny_talwar

No problem at all

Anonymous
Not applicable
Author

‌could u help me in the post I posted earlier

name- based on other date

thanks