Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

finding min date

Hello All,

i have a set of data( Ticket and date);

example data set:

ticket          date

100          9/10/2015

100          10/10/2015

100          11/10/2015

101          10/10/2015

so i want to get the min date associated to every ticket ie:

  ticket          date

100                9/10/2015

101          10/10/2015

could you please help me get the same.

Regards

Mythili

12 Replies
sasiparupudi1
Master III
Master III

Hi

First convert your date string into a qv Date

T1:

LOAD ticket,Date(Date#(date,'DD/MM/YYYY'),'DD/MM/YYYY') as date Inline

[

ticket,date

100,9/10/2015

100,10/10/2015

100,11/10/2015

101,10/10/2015

];

in the front end

create a straight table

use ticket as dimension

use min(dates) as expression

hth

Sasi

Not applicable
Author

Hello All,

thanks for the help so far, but just to make things clear: the script that i ma using is:

CompletedTemp:

LOAD  Distinct

TICKET ,

Date( Makedate(Right(DATE,4),Mid(DATE,4,2),Left(DATE,2)),'DD-MM-YYYY') as DATE1

FROM

$(vQVD)\DAILY_TICKETS_RUNNING.qvd (qvd)

Where STATUS='Completed'

;

STABILITY_TMP:

NOCONCATENATE

LOAD

Distinct

TICKET ,

DATE(MIN(DATE1)) AS date2

RESIDENT CompletedTemp

WHERE TICKET=TICKET

Group by TICKET;

EXIT SCRIPT;

I will then have to join to the table "STABILITY_TMP" the rest of the fields based on the unique combinations of "ticket" and "Date" fields.

Thanks to suggest.

Mythili

qlikviewwizard
Master II
Master II

Hi,

Did you try as I have given the script? It is working for me.

If possible upload the sample file.