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: 
Not applicable

How to return the first order date?

Hello,

I need to know how a can get the first date order from a list of several customer

Firts order date results:

Customer 1 = 12/apr/98

Customer 2 = 10/may/99

Thanks

4 Replies
Not applicable
Author

Rib,

Could you please explain your requirement in details and post the same application with data.

If you want to look for first sorterd value then could look for firstsortedvalue() function.

-Sridhar

Not applicable
Author

Hi Sridhar,

I have a list like below:

Customer_id   Order_date    Order_value

01                  12/APR/10          100,00

02                  13/APR/10          100,00

03                  20/MAY/10          100,00

04                  02/JUN/10           100,00

01                  03/JUN/10           100,00

02                  04/JUN/10           100,00

I need to know how is the first order date for each customer like the results below:

Customer_id   First Order_date 

01                       12/APR/10

02                       13/APR/10     

I need to know also how is the last order date foe each customer

Customer_id   Last Order_date 

01                      03/JUN/10

02                     04/JUN/10    

Thanks again     

erichshiino
Partner - Master
Partner - Master

Let`s say that the first table is called ORDERS.

You can create two more tables like this:

MinMax:

load Customer_id, min(Order_date) as First_Order_date,

max(Order_date) as Last_Order_date

resident ORDERS;

Regards,

Erich

Not applicable
Author

ok Erich Thanks.

Actually using the min(order_date)  and max(order_date) I get the results than I need. Thanks again !