Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
anavin33
New Contributor II

Earliest Date

So I am creating a table that displays account numbers and certain dates that correspond with the account number. I am wondering how to only display the earliest date for each account number as opposed to every date for each account number.

Tried using min and firstvalue and couldnt get either to work

LoanLoss:

LOAD

acct_nbr as distinctAcct,

prod_dt as prod_dt2

Resident Loans

where is90 = 1;

1 Solution

Accepted Solutions
eduardo_sommer
Valued Contributor

Re: Earliest Date

Try this

LoanLoss:

Load

acct_nbr as distinctAcct,

date(min(prod_dt)) as prod_dt2

Resident Loans

where is90 = 1

group by acct_nbr;

Eduardo

3 Replies
mov
Esteemed Contributor III

Re: Earliest Date

The min() function should work.  You're missing something...  Can you upload your QV file?

eduardo_sommer
Valued Contributor

Re: Earliest Date

Try this

LoanLoss:

Load

acct_nbr as distinctAcct,

date(min(prod_dt)) as prod_dt2

Resident Loans

where is90 = 1

group by acct_nbr;

Eduardo

anavin33
New Contributor II

Re: Earliest Date

This worked! Thank you!

Community Browser