Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

dinicholls
Contributor II

Earliest Date Record Only

Hi,

I have customers that have been assigned to duplicate branches. I need to only pull in the details for the earliest commence date, and not pull in any other records for that particular customer.

I have attached a copy of sample data.

I have tried all sorts, Min, MinRange, etc, but still cannot get it to work.

Any ideas?

Thanks

Di

2 Replies

Re: Earliest Date Record Only

Try this

Table:

LOAD Customer,

    Branch,

    [Branch Number],

    [Commence Date]

FROM

[Sample_Data.xls]

(biff, embedded labels, table is [Sheet1$]);


Right Join (Table)

LOAD Customer,

Min([Commence Date]) as [Commence Date]

Resident Table

Group By Customer;

olivierrobin
Valued Contributor III

Re: Earliest Date Record Only

hello

i would proceed in two times :

1 - extract min date and Customer  for each Customer

load Customer,min(commencedate) as mindate

2 - left join that 1st table wwith the data on keys Customer and mindate

left join(table) load Customer, commencedate as mindate, .......

Mind the date format